This file contains hidden or 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
var http = require('http'), | |
stream = require('stream'); | |
var config = { | |
host: 'nodejs.org', | |
target_port: 80, | |
listen_port: 8042, | |
script: '<script>alert("hi")</script>', | |
}; |
This file contains hidden or 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/sh | |
# Native notifications for remote irssi on OSX 10.8+. | |
# | |
# Requires: | |
# fnotify.pl (https://github.com/rndstr/fnotify/blob/master/fnotify.pl) | |
# terminal-notifier (https://github.com/alloy/terminal-notifier) | |
# | |
# Usage: | |
# Load fnotify.pl in irssi (`script load fnotify`). Run `irssi-notify |
This file contains hidden or 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
create-visor() { | |
local p='/Applications' | |
cp -rf $p/iTerm.app $p/iTermVisor.app | |
mv $p/iTermVisor.app/Contents/MacOS/iTerm $p/iTermVisor.app/Contents/MacOS/iTermVisor | |
defaults write $p/iTermVisor.app/Contents/Info CFBundleIdentifier com.googlecode.iterm2visor | |
defaults write $p/iTermVisor.app/Contents/Info CFBundleExecutable iTermVisor | |
defaults write $p/iTermVisor.app/Contents/Info CFBundleName iTermVisor | |
defaults write $p/iTermVisor.app/Contents/Info LSUIElement 1 | |
rm -rf ~$p/iTermVisor.app | |
mv $p/iTermVisor.app ~$p |
This file contains hidden or 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
function cdf { | |
pushd "`pwdf $@`"; | |
} |
This file contains hidden or 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/sh | |
# Bootstrap new OSX system with common CLI utilities and scripts. | |
# Prereq: | |
# Install java from: http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html | |
export PATH=~/.ellipsis/bin:/usr/local/bin:$PATH | |
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" |
This file contains hidden or 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 | |
# | |
# Minimal IRC client. Compatible with Python 2 and 3. | |
import os, select, signal, socket, sys, time | |
try: username = os.getlogin() | |
except: username = "unknown" | |
hostname = socket.gethostname() | |
irc = socket.socket(socket.AF_INET, socket.SOCK_STREAM) |
This file contains hidden or 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 node | |
// Treat first argument to cake as task name, push it to the end so cake agrees | |
if (process.argv[2] && process.argv[2].charAt(0) !== '-') process.argv.push(process.argv.splice(2, 1)[0]) | |
require('coffee-script/lib/coffee-script/cake').run(); |
This file contains hidden or 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
require 'formula' | |
class Irssi < Formula | |
homepage 'http://irssi.org/' | |
url 'http://irssi.org/files/irssi-0.8.15.tar.bz2' | |
sha1 'b79ce8c2c98a76b004f63706e7868cd363000d89' | |
option "without-perl", "Build without perl support." | |
depends_on :clt # See https://github.com/Homebrew/homebrew/issues/20952 |
This file contains hidden or 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
import requests | |
from requests.adapters import HTTPAdapter | |
from requests.packages.urllib3.connection import HTTPConnection, HTTPSConnection | |
from requests.packages.urllib3.connectionpool import HTTPConnectionPool, HTTPSConnectionPool | |
from requests.packages.urllib3.poolmanager import PoolManager | |
def create_bound_session(source_address): | |
''' | |
Creates a requests session bound to a given source address. Proving once |
This file contains hidden or 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 python2.7 | |
""" | |
description | |
hoodoo is a task management app. tasks can be tagged, searched, sorted. | |
commands available | |
add <name> #<tag> add a new task | |
alias: + | |
opt: created=<date> due=<date> done=True/False, tags |