Skip to content

Instantly share code, notes, and snippets.

@bool-dev
bool-dev / app.py
Created July 6, 2014 08:54 — forked from kkung/app.py
from flask import Flask, request, session, url_for, redirect, \
render_template, abort, g, flash
from werkzeug.contrib.sessions import Session, SessionStore
from cPickle import HIGHEST_PROTOCOL
from random import random
from flask import json
class MemcachedSessionStore(SessionStore):
def __init__(self, servers=None, key_prefix=None, default_timeout=300):
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
/* modernizr-test.js
* Daniel Ott
* 3 March 2011
* Custom Tests using Modernizr's addTest API
*/
/* iOS
* There may be times when we need a quick way to reference whether iOS is in play or not.
* While a primative means, will be helpful for that.
*/
#!/bin/bash
set -o errexit
set -o nounset
if [[ ${#} -ne 1 ]]
then
echo "Usage: ${0} upstart-conf-file" >&2
exit 1
fi
@bool-dev
bool-dev / brew install pyexiv2 output
Created September 15, 2013 16:38
brew install pyexiv2 output
$ brew install -v pyexiv2 2>&1
==> Downloading http://launchpad.net/pyexiv2/0.3.x/0.3.2/+download/pyexiv2-0.3.2.tar.bz2
Already downloaded: /Library/Caches/Homebrew/pyexiv2-0.3.2.tar.bz2
tar xf /Library/Caches/Homebrew/pyexiv2-0.3.2.tar.bz2
==> Patching
/usr/bin/patch -f -p1 -i 000-homebrew.diff
patching file src/SConscript
brew: PYTHONPATH=/usr/local/Cellar/pyexiv2/0.3.2/lib/python2.7/site-packages:/usr/local/Cellar/pyexiv2/0.3.2/libexec/lib/python2.7/site-packages
==> scons BOOSTLIB=boost_python-mt
scons BOOSTLIB=boost_python-mt
@bool-dev
bool-dev / brew config output
Created September 15, 2013 16:34
brew --config output
$ brew --config
HOMEBREW_VERSION: 0.9.4
ORIGIN: https://github.com/mxcl/homebrew
HEAD: be257f4b6dc0985fe134342fed8ff5f6646c571a
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CELLAR: /usr/local/Cellar
CPU: quad-core 64-bit sandybridge
OS X: 10.7.5-x86_64
Xcode: 4.6.3
CLT: 1.0.0.9000000000.1.1249367152
@bool-dev
bool-dev / brew doctor output
Last active December 23, 2015 03:09
brew doctor output for issue
$ brew doctor
Warning: Setting DYLD_* vars can break dynamic linking.
Set variables:
DYLD_LIBRARY_PATH
Warning: /usr/local/share/python is not needed in PATH.
Formerly homebrew put Python scripts you installed via `pip` or `pip3`
(or `easy_install`) into that directory above but now it can be removed
from your PATH variable.
Python scripts will now install into /usr/local/bin.