mkdir -p /run/shm
sudo mount -t tmpfs -o size=1024M tmpfs /run/shm
or more permanently in /etc/fstab
tmpfs           /run/shm        tmpfs   size=1g         0       0
| ## known date of 1st jan 2000 | |
| # baktun = "13" | |
| # katun = "20" | |
| # tun = "7" | |
| # uinal = "16" | |
| # kin = "3" | |
| ## target date to find - should return 22 March 2001 | |
| baktun = "13" | |
| katun = "20" | 
| <?php | |
| use Monolog\Logger; | |
| use Monolog\Handler\StreamHandler; | |
| class foo extends bar | |
| { | |
| private $log = null; | |
| public function __construct($swiftmailer, $service_container) | 
mkdir -p /run/shm
sudo mount -t tmpfs -o size=1024M tmpfs /run/shm
or more permanently in /etc/fstab
tmpfs           /run/shm        tmpfs   size=1g         0       0
| // example body | |
| var buf = new Buffer(9); | |
| // start of frame | |
| buf[0] = '0xAA'; | |
| buf[1] = '0xBB'; | |
| // message to send - crc is based on this | |
| var msg = ['0x01', '0x03', '0x00', '0x00', '0x01']; | 
curl -i -H "Accept: application/json" -X PUT -d "" http://localhost:5984/chatbot/
curl -X GET http://localhost:5984/chatbot/_all_docs?include_docs=true
| #!/bin/bash | |
| # Watch files for changes and perform an action. | |
| # Needs inotify-tools. | |
| function doAction { | |
| ./copy-admin-templates.sh; | |
| xdotool search --name chrome key --window %@ F5; | |
| } | 
| svn diff | source-highlight --out-format=esc --src-lang=diff | 
| <VirtualHost *:80> | |
| ServerName foo.kevin.dev | |
| ServerAlias foo.local.dev | |
| ServerAlias foo.local.test | |
| DocumentRoot /home/kevin/projects/foo/web/ | |
| <Directory /home/kevin/projects/foo/web/> | |
| Options Indexes FollowSymLinks MultiViews | |
| # pcw AllowOverride None | |
| AllowOverride All | 
| namespace :deploy do | |
| desc "Override deploy:cold to include database setup" | |
| task :cold do | |
| before :run_migrations do | |
| capifony_pretty_print "--> Creating database" | |
| run "#{release_path}/app/console mygreatdbcommand:database:create-once" | |
| capifony_puts_ok | |
| end |