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
#!/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
#!/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
#!/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
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
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
#!/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
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 | |
# install deps | |
yum install -y gcc make ncurses-devel ruby ruby-devel python python-devel wget | |
# download vim sources | |
wget ftp://ftp.vim.org/pub/vim/unix/vim-7.3.tar.bz2 | |
bunzip2 vim-7.3.tar.bz2 && tar xvf vim-7.3.tar | |
cd vim73 |
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
injectArgs = (func, args...) -> | |
rawFunc = func.toString() | |
argNames = (a.trim() for a in (/function \((.*)\)/.exec rawFunc)[1].split(',')) | |
func = rawFunc.replace /function \((.*)\)/, 'function anonymous()' | |
if args.length != argNames.length | |
throw new Error 'Function arity must match number of passed arguments' | |
unless args.length > 0 | |
return new Function func |