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
#!/bin/sh | |
files="$(find -L . -name "*.js" -type f)" | |
echo "Scripts to minify: $(echo -n "$files" | wc -l)" | |
echo "$files" | while read file; do | |
uglifyjs "$file" -o "$file" -c -m | |
done | |
files="$(find -L . -name "*.css" -type f)" | |
echo "Stylesheets to minify: $(echo -n "$files" | wc -l)" | |
echo "$files" | while read file; do |
<? $lines = explode("\n",shell_exec("find ~/vhosts -name '*.md' -type f -print0 | xargs -0 fgrep ".escapeshellarg(params('search'))));?> | |
found <?=pluralize(count($lines),'results')?> for “<?=h(params('search'))?>” | |
<? foreach ($lines as $l){ | |
$e = explode('.md:',$l); | |
$path = basename(reset($e)); | |
$excerpt = end($e); ?> | |
<li><?=highlight(h(strip_tags(markdown($excerpt))),params('search'))?> – <a href="/doc/<?=$path?>"><?=humanize($path)?></a></li> | |
<? } ?> |
function initializeGoogleAnalytics(){ | |
GoogleAnalytics.init(); | |
} | |
var GoogleAnalytics = { | |
accountId: null, | |
accessToken: null, | |
getAccountId: function(){ | |
return (this.accountId) ? 'ga:'+this.accountId : null; |
ZSH=$HOME/.oh-my-zsh | |
ZSH_THEME="kphoen" | |
export LESS_TERMCAP_mb=$'\E[01;31m' # begin blinking | |
export LESS_TERMCAP_md=$'\E[01;38;5;74m' # begin bold | |
export LESS_TERMCAP_me=$'\E[0m' # end mode | |
export LESS_TERMCAP_se=$'\E[0m' # end standout-mode | |
export LESS_TERMCAP_so=$'\E[38;5;246m' # begin standout-mode - info box | |
export LESS_TERMCAP_ue=$'\E[0m' # end underline |
set nocompatible | |
syntax enable | |
set number " Show line numbers. | |
set ruler " Show cursor position. | |
set showcmd " Display incomplete commands. | |
set showmode " Display the mode you're in. | |
set incsearch " Highlight matches as you type. |
var BrowsersByDate = new Widget({ | |
dimensions:'ga:browser', | |
columns:['ga:browser'], | |
period:'weekly', | |
chart:'area', | |
sort:'-ga:pageviews' | |
}); | |
var Browsers = new Widget({ |
ruby -e "$(curl -fsSkL https://gist.githubusercontent.com/saetia/2369908/raw/4bf9a6d36060582e69f02c314f66449971a7bb11/parse.rb)" /Users/Joel/site.db.121010.dump | |
ruby parse.rb site.120411.dump |
git init --bare ~/private/deploy.git
echo '#!/bin/sh
echo 'updating website'
GIT_WORK_TREE=/var/www/vhosts/site.diedrick.net/httpdocs/ git checkout -f' > /var/www/vhosts/site.diedrick.net/private/deploy.git/hooks/post-receive &&
chmod 755 /var/www/vhosts/site.diedrick.net/private/deploy.git/hooks/post-receive