#Mac OS X
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import logging | |
import multiprocessing | |
import os | |
import urllib2 | |
import subprocess | |
import sys | |
import time | |
from xml.etree import ElementTree |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.core.exceptions import MiddlewareNotUsed | |
from django.conf import settings | |
from django.db import connection | |
from pymongo.connection import Connection | |
from time import time | |
import struct | |
import bson | |
from bson.errors import InvalidBSON | |
class SqldumpMiddleware(object): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
################################################################## | |
# /etc/elasticsearch/elasticsearch.yml | |
# | |
# Base configuration for a write heavy cluster | |
# | |
# Cluster / Node Basics | |
cluster.name: logng | |
# Node can have abritrary attributes we can use for routing |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Requires OS X with Homebrew | |
## Configuration ## | |
FROM_NAME="" | |
FROM_EMAIL="" | |
KINDLE_EMAIL="" | |
SMTP_HOST="" | |
SMTP_PORT="587" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# When you are working on your macbook sitting in cafe and you have to go pee, | |
# you need some way to guard you machine. | |
# | |
# Start this script, remove any earphones, and go do the job. | |
# The assumption is the thief will close the lid of the laptop before taking it away. | |
# This script detects the closing of the lid and plays some loud audio that will | |
# likely distract the thief and/or grab attention of nearby people, making the |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#/usr/bin/env bash | |
# MIT © Sindre Sorhus - sindresorhus.com | |
# 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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name | default_version | installed_version | comment | |
------------------------+-----------------+-------------------+--------------------------------------------------------------------- | |
pg_buffercache | 1.0 | | examine the shared buffer cache | |
earthdistance | 1.0 | | calculate great-circle distances on the surface of the Earth | |
pg_freespacemap | 1.0 | | examine the free space map (FSM) | |
intagg | 1.0 | | integer aggregator and enumerator (obsolete) | |
plperl | 1.0 | | PL/Perl procedural language | |
sslinfo | 1.0 | | information about SSL certificates | |
btree_gist | 1.0 | | support for indexing common datatypes in GiST | |
fuzzystrmatch | 1.0 |