Skip to content

Instantly share code, notes, and snippets.


Block or report user

Report or block bool-dev

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
bool-dev /
Created Jan 17, 2018 — forked from olivierlacan/
How to migrate a Homebrew-installed PostgreSQL database to a new major version (9.3 to 9.4) on OS X

This guide assumes that you recently run brew upgrade postgresql and discovered to your dismay that you accidentally bumped from one major version to another: say 9.3.x to 9.4.x. Yes, that is a major version bump in PG land.

First let's check something.

brew info postgresql

The top of what gets printed as a result is the most important:

bool-dev /
Created Jan 3, 2018 — forked from joech4n/
Get bucket size and object count by first level prefix (i.e. bucket/prefix1, bucket/prefix2)
BUCKETNAME=mybucketname; REGION=us-east-1; for prefix in $(aws s3api list-objects --bucket $BUCKETNAME --delimiter '/' --output text --region $REGION |grep COMMONPREFIX |tail -n+2| awk '{print $2}'); do echo "Totals for $prefix"; aws s3 ls --summarize --human-readable --recursive s3://$BUCKETNAME/$prefix --region $REGION ; done |grep Total
bool-dev /
Created Nov 6, 2017 — forked from bastman/
docker cleanup guide: containers, images, volumes, networks

Docker - How to cleanup (unused) resources

Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...

delete volumes

// see:

$ docker volume rm $(docker volume ls -qf dangling=true)
$ docker volume ls -qf dangling=true | xargs -r docker volume rm
bool-dev / requirements.txt
Last active Oct 27, 2017
simple test flask sqlalchemy app
View requirements.txt
bool-dev /
Created Jun 8, 2016 — forked from jamtur01/
Kickstarter Engineering Ladder
bool-dev / nginx.conf
Created May 27, 2016 — forked from jmervine/nginx.conf
Nginx config to test regex.
View nginx.conf
# Usage:
# Start with:
# sudo /use/local/sbin/nginx -c /path/to/this/nginx.conf
# Tail logs:
# $ sudo tail -f /tmp/access.log /tmp/error.log /tmp/match.log
bool-dev / gist:5b124f72590cda3d5f13
Created Mar 7, 2016 — forked from gcatlin/gist:1847248
Install specific version of Homebrew formula
View gist:5b124f72590cda3d5f13
brew update
brew versions FORMULA
cd `brew --prefix`
git checkout HASH Library/Formula/FORMULA.rb # use output of "brew versions"
brew install FORMULA
git checkout -- Library/Formula/FORMULA.rb # reset formula
## Example: Using Subversion 1.6.17
bool-dev / post-merge
Created Feb 12, 2016 — forked from sindresorhus/post-merge
git hook to run a command after `git pull` if a specified file was changed. In this example it's used to run `npm install` if package.json changed and `bower install` if `bower.json` changed. Run `chmod +x post-merge` to make it executable then put it into `.git/hooks/`.
View post-merge
#/usr/bin/env bash
# MIT © Sindre Sorhus -
# git hook to run a command after `git pull` if a specified file was changed
# Run `chmod +x post-merge` to make it executable then put it into `.git/hooks/`.
changed_files="$(git diff-tree -r --name-only --no-commit-id ORIG_HEAD HEAD)"
check_run() {
echo "$changed_files" | grep --quiet "$1" && eval "$2"
bool-dev / Jinja module
Created Feb 8, 2016 — forked from voscausa/Jinja module
Jinja2 compiled templates module loader for App Engine Pyhton 2.7.
View Jinja module

Jinja compiled templates module loader

This code is part of a Jinja CMS for Google App Engine Python 2.7 and NDB datastore

A Jinja enviroment is created for every CMS site: site_key_id = 'example

The modules are created using The resulting code objects are stored in the dadastore using Kind Runtimes and a BlobProperty

The modules can also be saved / downloaded as .pyc in a zip archive: <site_key_id>

You can’t perform that action at this time.