sudo apt-get update
sudo apt-get install python python-setuptools python-pip python-dev libxslt1-dev libxml2-dev libmysqlclient-dev
sudo pip install -U virtualenv
virtualenv /clients/sentry/
source /clients/sentry/bin/activate
sudo apt-get update
sudo apt-get install python python-setuptools python-pip python-dev libxslt1-dev libxml2-dev libmysqlclient-dev
sudo pip install -U virtualenv
virtualenv /clients/sentry/
source /clients/sentry/bin/activate
<?php | |
$shortopts = "m:"; | |
$shortopts .= "o::"; | |
$shortopts .= "i::"; | |
$shortopts .= "f::"; | |
$options = getopt($shortopts); | |
if (!$options) { | |
echo "Usage:\n\n"; |
So one of the painful points of using docker
on OS X is that you need to run a virtualbox VM, which often suffers from performance issues. With xhyve, a OS X virtualization system, and docker-machine-xhyve you can now have docker
use the native OS X hypervisor to run containers.
No more dealing with virtualbox shenanigans!
In this script, I've also set up a way to autoconfigure terminal sessions to load docker's environment vars (dependent on docker-machine
) so you do not have to run eval $(docker-machine env whatever)
every time you open a new terminal window.
I hereby claim:
To claim this, I am signing this object:
CREATE OR REPLACE VIEW public.unused_indexes AS | |
SELECT | |
(pg_stat_all_indexes.schemaname :: TEXT || '.' :: TEXT) || pg_stat_all_indexes.relname :: TEXT, | |
pg_stat_all_indexes.indexrelname, | |
pg_stat_all_indexes.idx_scan, | |
pg_size_pretty( | |
pg_relation_size(((pg_stat_all_indexes.schemaname :: TEXT || '.' :: TEXT) || pg_stat_all_indexes.indexrelname :: TEXT) :: REGCLASS)) AS pg_size_pretty | |
FROM pg_stat_all_indexes | |
WHERE (pg_stat_all_indexes.schemaname <> ALL (ARRAY ['pg_toast' :: NAME, 'pg_catalog' :: NAME])) AND pg_stat_all_indexes.idx_scan = 0 AND | |
pg_relation_size(((pg_stat_all_indexes.schemaname :: TEXT || '.' :: TEXT) || pg_stat_all_indexes.indexrelname :: TEXT) :: REGCLASS) > |
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
var getAbsoluteUrl = (function() { | |
var a; | |
return function(url) { | |
if(!a) a = document.createElement('a'); | |
a.href = url; | |
return a.href; | |
}; | |
})(); |
# Credit http://stackoverflow.com/a/2514279 | |
for branch in `git branch -r | grep -v HEAD`;do echo -e `git show --format="%ci %cr" $branch | head -n 1` \\t$branch; done | sort -r |
sudo apt-get update | |
sudo apt-get install python-virtualenv | |
sudo apt-get install python-dev | |
sudo apt-get install postgresql | |
sudo apt-get install postgresql-server-dev-9.3 | |
sudo apt-get install redis-server | |
sudo -u postgres createuser -s sentry | |
sudo -u postgres psql -c "alter user sentry with password 'sentry';" |
location /resize { | |
alias /tmp/nginx/resize; | |
set $width 150; | |
set $height 100; | |
set $dimens ""; | |
if ($uri ~* "^/resize_(\d+)x(\d+)/(.*)" ) { | |
set $width $1; | |
set $height $2; | |
set $image_path $3; |