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
Awesome PHP has been relocated permanently to its own Github repository. No further updates will made to this gist.
Please open an issue for any new suggestions.
#!/bin/bash | |
# Script for placing sudoers.d files with syntax-checking | |
# Making a temporary file to contain the sudoers-changes to be pre-checked | |
TMP=$(mktemp -t vagrant_sudoers) | |
cat /etc/sudoers > $TMP | |
cat >> $TMP <<EOF | |
# Allow passwordless startup of Vagrant when using NFS. | |
Cmnd_Alias VAGRANT_EXPORTS_ADD = /usr/bin/su root -c echo '*' >> /etc/exports |
function domdown(dom) { | |
if (dom.type === "tag") { | |
if (dom.name === "br") { | |
return " \n"; | |
} | |
if (dom.name === "em") { | |
return "*" + ent.decode(dom.data) + "*\n"; | |
} |
# | |
# Slightly tighter CORS config for nginx | |
# | |
# A modification of https://gist.github.com/1064640/ to include a white-list of URLs | |
# | |
# Despite the W3C guidance suggesting that a list of origins can be passed as part of | |
# Access-Control-Allow-Origin headers, several browsers (well, at least Firefox) | |
# don't seem to play nicely with this. | |
# |
server { | |
index index.php; | |
set $basepath "/var/www"; | |
set $domain $host; | |
# check one name domain for simple application | |
if ($domain ~ "^(.[^.]*)\.dev$") { | |
set $domain $1; | |
set $rootpath "${domain}"; |
#!/bin/bash | |
# | |
# ~/.virtualenvs/postactivate | |
# | |
# This hook is run after this virtualenv is activated. | |
source ~/.rvm/scripts/rvm | |
# use a specific version of Ruby | |
rvm use 1.9.3 |