Skip to content

Instantly share code, notes, and snippets.

View tswicegood's full-sized avatar
🤠

Travis Swicegood tswicegood

🤠
View GitHub Profile
We couldn’t find that file to show.
@DavidYKay
DavidYKay / gist:912765
Created April 10, 2011 21:52
"Can Code Be Like Literature" - Jeremy Ashkenas
Jeremy
Absolutely brilliant
both technically
and oratorically
He wrote CoffeeScript
1st place 5k
21 min, 3 seconds
<7min mile
Big picture
@jefftriplett
jefftriplett / gist:910213
Created April 8, 2011 16:23
project_name.sh
#!/bin/sh
# First, open up GitX
# cd ~/Code/Python/django-haystack; gitx
tmux start-server
tmux new-session -d -s ProjectName -n git
tmux new-window -tProjectName:1 -n test
tmux new-window -tProjectName:2 -n solr
tmux new-window -tProjectName:3 -n runserver
tmux new-window -tProjectName:4 -n utility
/*
A simple new-line delimited JSON protocol with upgrades.
Receiving Usage:
protocol = require('./frame-protocol');
// parsing data
parser = protocol.Parser();
@unixmonkey
unixmonkey / Cucumber Plain Text Feature.tmLanguage
Created March 10, 2011 20:15
Cucumber Language definition file for TextMate; modified to work with Sublime Text 2
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>fileTypes</key>
<array>
<string>feature</string>
</array>
<key>firstLineMatch</key>
<string>기능|機能|功能|フィーチャ|خاصية|תכונה|Функціонал|Функционалност|Функционал|Особина|Могућност|Özellik|Właściwość|Tính năng|Savybė|Požiadavka|Požadavek|Osobina|Ominaisuus|Omadus|OH HAI|Mogućnost|Mogucnost|Jellemző|Fīča|Funzionalità|Funktionalität|Funkcionalnost|Funkcionalitāte|Funcționalitate|Functionaliteit|Functionalitate|Funcionalitat|Funcionalidade|Fonctionnalité|Fitur|Feature|Egenskap|Egenskab|Crikey|Característica|Arwedd(.*)</string>
@nelstrom
nelstrom / only.vim
Created February 11, 2011 07:52
A command to close all Vim buffers that are not currently visible.
command! -nargs=* Only call CloseHiddenBuffers()
function! CloseHiddenBuffers()
" figure out which buffers are visible in any tab
let visible = {}
for t in range(1, tabpagenr('$'))
for b in tabpagebuflist(t)
let visible[b] = 1
endfor
endfor
" close any buffer that are loaded and not visible
@ry
ry / https-hello-world.js
Created January 4, 2011 00:03
new node https api
// curl -k https://localhost:8000/
var https = require('https');
var fs = require('fs');
var options = {
key: fs.readFileSync('test/fixtures/keys/agent2-key.pem'),
cert: fs.readFileSync('test/fixtures/keys/agent2-cert.pem')
};
https.createServer(options, function (req, res) {
// new node.js tls api
var tls = require('tls');
var fs = require('fs');
var options = {
key: fs.readFileSync('test/fixtures/keys/agent2-key.pem'),
cert: fs.readFileSync('test/fixtures/keys/agent2-cert.pem')
};
var server = tls.createServer(options, function (s) {
import logging
import os
import signal
import sys
def when_ready(server):
def monitor():
modify_times = {}
while True:
for module in sys.modules.values():

finger_server.js

An extremely minimal implementation of the `Finger protocol`_ using node.js.

To run (Finger uses port 79 which requires sudo):

sudo node finger_server.js