sudo openssl genrsa -des3 -out server.key 2048
openssl req -new -key server.key -out server.csr
Country Name (2 letter code) [AU]:US
/usr/bin/ruby -e "$(curl -fsSL https://raw.github.com/gist/323731)" | |
brew install dnsmasq | |
mate /usr/local/etc/dnsmasq.conf | |
address=/dev/127.0.0.1 | |
address=/build/127.0.0.1 | |
address=/stage/192.168.10.200 | |
listen-address=127.0.0.1 |
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
var BrowsersByDate = new Widget({ | |
dimensions:'ga:browser', | |
columns:['ga:browser'], | |
period:'weekly', | |
chart:'area', | |
sort:'-ga:pageviews' | |
}); | |
var Browsers = new Widget({ |
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. |
https://api.instagram.com/oauth/authorize/?client_id=[client_id]&redirect_uri=[redirect_uri]&response_type=code | |
curl -F 'client_id=[client_id]' -F 'client_secret=[client_secret]' -F 'grant_type=authorization_code' -F 'redirect_uri=[redirect_url]' -F 'code=[code]' https://api.instagram.com/oauth/access_token |
<? $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> | |
<? } ?> |
#!/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 |
#!/usr/bin/php -q | |
<? | |
chdir(__DIR__); | |
define('VERSION','0.6.5'); | |
define("SITES_PATH",reset(explode(basename(__DIR__),__DIR__))); | |
define("DB_PW",generate_pw()); | |
define("FTP_PW",generate_pw()); | |
define("EMAIL_PW",generate_pw()); | |
define("FINGERPRINT",strtoupper(generate_pw(20))); | |
define("DEVELOPER",trim(get_current_user())); |