most of these require logout/restart to take effect
# Enable character repeat on keydown
defaults write -g ApplePressAndHoldEnabled -bool false
# Set a shorter Delay until key repeat
var amqp = require('amqplib/callback_api'); | |
// if the connection is closed or fails to be established at all, we will reconnect | |
var amqpConn = null; | |
function start() { | |
amqp.connect(process.env.CLOUDAMQP_URL + "?heartbeat=60", function(err, conn) { | |
if (err) { | |
console.error("[AMQP]", err.message); | |
return setTimeout(start, 1000); | |
} |
# Compile PCRE - Perl Compatible Regular Expressions | |
cd /usr/local/src | |
curl -O ftp://ftp.csx.cam.ac.uk//pub/software/programming/pcre/pcre-8.31.tar.gz | |
tar -xvzf pcre-8.31.tar.gz | |
cd pcre-8.31 | |
./configure | |
make | |
sudo make install | |
# Compile Autoconf |
# Install DNSmasq | |
brew install dnsmasq | |
# cp default config to the right place | |
cp /usr/local/Cellar/dnsmasq/2.63/dnsmasq.conf.example /usr/local/etc/dnsmasq.conf | |
# Daemonize | |
sudo cp /usr/local/Cellar/dnsmasq/2.63/homebrew.mxcl.dnsmasq.plist /Library/LaunchDaemons/ | |
# Add .dev to the resolver |
jQuery(function($) { | |
$('form[data-async]').live('submit', function(event) { | |
var $form = $(this); | |
var $target = $($form.attr('data-target')); | |
$.ajax({ | |
type: $form.attr('method'), | |
url: $form.attr('action'), | |
data: $form.serialize(), |
#!/bin/sh | |
# Just copy and paste the lines below (all at once, it won't work line by line!) | |
# MAKE SURE YOU ARE HAPPY WITH WHAT IT DOES FIRST! THERE IS NO WARRANTY! | |
function abort { | |
echo "$1" | |
exit 1 | |
} | |
set -e |