Skip to content

Instantly share code, notes, and snippets.

View dylanvee's full-sized avatar

Dylan Vassallo dylanvee

  • San Francisco, CA
  • 20:24 (UTC -07:00)
View GitHub Profile
@mjtko
mjtko / sync_middleware.rb
Created September 21, 2011 13:19
Synchronous middleware for Faye
require 'faye'
require 'json'
require 'rack'
require 'cgi'
module Faye
class SyncMiddleware
include ::Faye::Logging
@dylanvee
dylanvee / ir_black.bbcolors
Created September 28, 2011 17:11 — forked from pgib/bbedit_colours.sh
IR_Black theme for TextWrangler
<?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>(null)_Other</key>
<string>rgba(0.866667,0.031373,0.023529,1.0)</string>
<key>(null)_Spaces</key>
<string>rgba(0.498039,0.498039,0.498039,1.0)</string>
<key>BackgroundColor</key>
<string>rgba(0.122179,0.122179,0.122179,1.0)</string>
@fabianp
fabianp / simple_client.py
Created October 15, 2011 08:44
Download torrent files in sequential order
"""
usage : simple_client.py torrent_file
"""
#!/usr/bin/env python
# Copyright Arvid Norberg 2008. Use, modification and distribution is
# subject to the Boost Software License, Version 1.0. (See accompanying
# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
# with modifications by Fabian Pedregosa <[email protected]>
# October 2011
@tbranyen
tbranyen / server.js
Last active July 4, 2021 18:44
backbone/node.js pushState enabled server
// Require libraries
var os = require("os");
var fs = require("fs");
var readline = require("readline");
var cluster = require("cluster");
var express = require("express");
var site = express();
// Var up, bro
var i, read;
@mklabs
mklabs / bootstrap-plugins.txt
Created December 2, 2011 11:23
h5bp + twitter bootstrap integration
bootstrap-tooltip.js
bootstrap-popover.js
bootstrap-alert.js
bootstrap-button.js
bootstrap-carousel.js
bootstrap-collapse.js
bootstrap-dropdown.js
bootstrap-modal.js
bootstrap-scrollspy.js
bootstrap-tab.js
@plamoni
plamoni / gist:1428474
Created December 3, 2011 23:19
Line by line input for how I got SiriProxy running on a fresh install of Ubuntu 11.10
#Here's what I did to get to the point where I'm at:
#-Install Ubuntu 11.10
#-Get all available updates
#-Add the VirtualBox add-ons and video driver
#-Set up SSH (for the SCP at the end)
#
# I have done nothing else to this virtual machine.
# On my iPhone, I set the DNS server to 192.168.2.131 (the IP of the virtual machine)
@rkh
rkh / chat.rb
Created December 14, 2011 12:55
Simple Chat Application using the Sinatra Streaming API
# coding: utf-8
require 'sinatra'
set server: 'thin', connections: []
get '/' do
halt erb(:login) unless params[:user]
erb :chat, locals: { user: params[:user].gsub(/\W/, '') }
end
get '/stream', provides: 'text/event-stream' do
@ryandotsmith
ryandotsmith / event_buffering.md
Created February 14, 2012 04:10
event buffering

Event Buffering

Eventually platforms outgrow the single-source-tree model and become distributed systems. A common pattern in these distributed systems is distributed composition via event buffering. Here we motivate and describe this event buffering pattern.

The Problem

@pheuter
pheuter / sc-dl.js
Created March 5, 2012 20:44
Bookmarklet that generates download link for a Soundcloud upload
(function(d) {
var dl = d.createElement('a');
dl.innerText = 'Download MP3';
dl.href = "http://media.soundcloud.com/stream/"+d.querySelector('#main-content-inner img[class=waveform]').src.match(/\.com\/(.+)\_/)[1];
dl.download = d.querySelector('em').innerText+".mp3";
d.querySelector('.primary').appendChild(dl);
dl.style.marginLeft = '10px';
dl.style.color = 'red';
dl.style.fontWeight = 700;
})(document);
@aantix
aantix / gist:1999816
Created March 8, 2012 09:08
Remote Pair Programming sucks. Here's how to solve it.

REAL WORLD SCENARIO (blinking lights)

Mr. Tom Dev wants to remote pair program with Mr. Todd Programmer. Tom is in New York, Todd is in San Francisco. They’re working on yet another blog written in Ruby. Tom fires up Rubymine, Todd fires up TextMate.

Todd’s editor quickly alerts him that he is connected with Tom and that their projects are out of sync. The plugin gives them each the option of using Tom’s file versions, Todd’s files, or performing a git pull request. They both do a git pull and are back in sync.

Todd quickly opens the User model in Rubymine with cmd-shift-N and Todd quickly sees that same file opened in Textmate. Todd then highlights a method that has been failing a test and Tom sees that highlight. Todd makes the change to the file, clicks cmd-s, and that file change is synced over to Tom.

Tom thought there was a secondary change needed in the Profile model, so he hits cmd-T, opens the Profile model and Todd sees that file opened in Rubymine. Todd tells Tom that he’s smoking catn