Skip to content

Instantly share code, notes, and snippets.

View vinbarnes's full-sized avatar

Kevin R. Barnes vinbarnes

View GitHub Profile
require 'date'
class Project < Struct.new(:name, :description)
attr_accessor :releases
attr_accessor :features
def initialize(*args)
super
@releases, @features = [], []
end
@vinbarnes
vinbarnes / gist:745412
Created December 17, 2010 18:14
communication is key
18:11 < vinbarnes> didn't get that memo
18:12 < rickbradley> yeah we communicate well
18:12 -!- rickbradley [[email protected]] has quit [Remote host closed the
connection]
twitter mobile engineer
async requests
kestrel: scala port of starling
## sms code
* twitter mobile site was first deployed with unicorn
* twitter mobile site now uses rainbows (for concurrency reasons)
diff --git a/spec/wd_command_spec.rb b/spec/wd_command_spec.rb
index ef97107..9ddbb81 100644
--- a/spec/wd_command_spec.rb
+++ b/spec/wd_command_spec.rb
@@ -2,7 +2,13 @@ require File.dirname(__FILE__) + '/spec_helper.rb'
require 'rake'
def run_command
- eval File.read(File.join(File.dirname(__FILE__), *%w[.. bin wd]))
+ cmd_path = File.expand_path(File.join(File.dirname(__FILE__), *%w[.. bin wd]))
@vinbarnes
vinbarnes / gist:876370
Created March 18, 2011 16:30
JavaScript Prototype “Class” Manager
/* === MANAGER CLASS === */
var Manager = function(cons) {
this.cons = cons;
this.objs = [];
};
Manager.prototype.create = function(args) {
var inst = new this.cons(args)
this.objs.push(inst);
An A-Z Index of the Apple OS X command line (TERMINAL)
The tcsh command shell of Darwin (the open source core of OSX)
aliasCreate an alias
allocList used and free memory awk Find and Replace text within file(s) basenameConvert a full pathname to just a folder path bash Bourne-Again SHell (Linux)
blessSet volume bootability and startup disk options.
breakExit from a loop
cal Display a calendar case Conditionally perform a command cat Display the contents of a file cd Change Directory
chflagsChange a file or folder's flags.
chgrpChange group ownership
chmod
$('div.message').html(function(index, oldhtml) {
return oldhtml.replace(/Removing/,'Fucking')
});
require "stateful"
class Folder < ActiveRecord::Base
include Stateful
# ...
stateful do
state :active
state :inactive
@vinbarnes
vinbarnes / .backup_excludes
Created April 28, 2011 00:09
file excludes for OS X rsync
.DS_Store
.Trashes
.Trash
.TemporaryItems
.Spotlight-*/
.fseventsd
#!/usr/bin/env ruby
#
# A quick script to dump an overview of all the open issues in all my github projects
#
require 'octokit'
require 'awesome_print'
require 'rainbow'