sudo su
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#deb cdrom:[Ubuntu 18.04 LTS _Bionic Beaver_ - Release amd64 (20180426)]/ bionic main restricted | |
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to | |
# newer versions of the distribution. | |
deb http://us.archive.ubuntu.com/ubuntu/ bionic main restricted | |
# deb-src http://us.archive.ubuntu.com/ubuntu/ bionic main restricted | |
## Major bug fix updates produced after the final release of the | |
## distribution. | |
deb http://us.archive.ubuntu.com/ubuntu/ bionic-updates main restricted |
cd /usr/src
curl -L https://www.rtai.org/userfiles/downloads/RTAI/rtai-4.1.tar.bz2 | tar xj
curl -L https://www.kernel.org/pub/linux/kernel/v3.x/linux-3.10.32.tar.xz | tar xJ
curl -L http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.10.32-saucy/linux-image-3.10.32-031032-generic_3.10.32-031032.201402221635_amd64.deb -o linux-image-3.10.32-generic-amd64.deb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### ElasticSearch version | |
if [ -z "$1" ]; then | |
echo "" | |
echo " Please specify the Elasticsearch version you want to install!" | |
echo "" | |
echo " $ $0 1.4.0" | |
echo "" | |
exit 1 | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Search for this line (on line 92 for me) | |
if (obj.vars.rmtcallback) { | |
uri = Drupal.settings.basePath + obj.vars.rmtcallback + '/' + marker.rmt; | |
} | |
// And change it to | |
if (obj.vars.rmtcallback) { | |
uri = Drupal.settings.basePath + Drupal.settings.pathPrefix + obj.vars.rmtcallback + '/' + marker.rmt; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt-get install pgbouncer | |
# edit /etc/pgbouncer/pgbouncer.ini file | |
# edit /etc/default/pgbouncer file and set START=1 | |
sudo service pgbouncer start | |
contents of /etc/pgbouncer/pgbouncer.ini file | |
[databases] | |
drupal = host=127.0.0.1 port=5432 dbname=drupal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1) install drupal & apache | |
wget http://ftp.drupal.org/files/projects/drupal-7.12.tar.gz | |
tar zxvf drupal-7.12.tar.gz | |
sudo apt-get install apache2 php5-pgsql php5-gd libapache2-mod-php5 php-apc | |
sudo mkdir /var/www/drupal | |
sudo mv drupal-7.12/* drupal-7.12/.htaccess /var/www/drupal | |
sudo cp /var/www/drupal/sites/default/default.settings.php /var/www/drupal/sites/default/settings.php | |
sudo chown www-data:www-data /var/www/drupal/sites/default/settings.php | |
sudo mkdir /var/www/drupal/sites/default/files |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* works for json objects. will replace all | |
* keys and values with the result of the | |
* closure. | |
*/ | |
function walk_recursive($obj, $closure) { | |
if ( is_object($obj) ) { | |
$newObj = new stdClass(); | |
foreach ($obj as $property => $value) { | |
$newProperty = $closure($property); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt-get update | |
sudo apt-get install munin-plugins-extra | |
cd /etc/munin/plugins | |
sudo ln -snf /usr/share/munin/plugins/memcached_ memcached_bytes | |
sudo ln -snf /usr/share/munin/plugins/memcached_ memcached_counters | |
sudo ln -snf /usr/share/munin/plugins/memcached_ memcached_rates | |
sudo aptitude install libcache-memcached-perl | |
sudo /etc/init.d/munin-node restart | |
sudo tail -f /var/log/munin/munin-node.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* V4L2 video capture example | |
* | |
* This program can be used and distributed without restrictions. | |
* | |
* This program is provided with the V4L2 API | |
* see http://linuxtv.org/docs.php for more information | |
*/ | |
#include <stdio.h> |
NewerOlder