Skip to content

Instantly share code, notes, and snippets.

@carymrobbins
carymrobbins / repr.js
Last active August 29, 2015 14:00 — forked from jacob414/repr.coffee
var repr = function (o, depth, max) {
var result, i;
depth = depth === undefined ? 0 : depth;
max = max === undefined ? 2 : max;
if (depth > max) {
return '<..>';
}
switch (typeof o) {
case 'string': return '"' + o.replace(/"/g, '\\"') + '"';
case 'function': return o.toString();
@carymrobbins
carymrobbins / install_xapian_inside_virtualenv_osx.sh
Last active June 12, 2019 17:54 — forked from asyncee/install xapian inside virtualenv
Install xapian in a virtualenv on Mac OS X using Homebrew.
#/bin/bash
set -e
if [ -z "$(which brew)" ]; then
echo "This script requires Homebrew."
exit
fi
if [ -z "$VIRTUAL_ENV" ]; then
# found this from Armin R. on Twitter, what a beautiful gem ;)
import ctypes
from types import DictProxyType, MethodType
def main():
import datetime
class _(monkey(int)):
#!/bin/bash
HOST=$1
if [ -z "$HOST" ]; then
echo "Enter host IP:"
read HOST
fi
sudo service denyhosts stop