Skip to content

Instantly share code, notes, and snippets.

View btaitelb's full-sized avatar

Ben Taitelbaum btaitelb

View GitHub Profile
@btaitelb
btaitelb / gist:2865014
Created June 3, 2012 20:51
keydownTest.html
<head>
<title>keydownTest</title>
</head>
<body>
{{> hello}}
</body>
<template name="hello">
<h1>Hello World!</h1>
.keytest {
width: 640px;
height: 480px;
border: 1px solid black;
}
if (Meteor.is_client) {
Template.hello.greeting = function () {
return "Welcome to keydownTest.";
};
Template.hello.events = {
'keydown .keytest' : function () {
// template data, if any, is available in 'this'
if (typeof console !== 'undefined')
console.log("You pressed the button");
@btaitelb
btaitelb / gist:2939745
Created June 16, 2012 03:07
alumni feedback to uva bov
as submitted via http://alumni.virginia.edu/contact/alumni-feedback/
I personally find the way that Sullivan left UVa to be consistent with the way I left,
through a non-transparent, closed-door decision that demonstrates neither scientific inquiry
nor academic rigor. It's great to see that the president is held to the same standards as students.
Speaking of standards, I believe that getting asked to leave the university demonstrates
that Sullivan was an upstanding person, who never lied, cheated or stole,
since I also know first hand that people don't get kicked out for those reasons.
@btaitelb
btaitelb / gist:3668537
Created September 7, 2012 18:50
programming pretty good practices

Programming Pretty Good Practices

  • Write code that works, most of the time at least.
  • Keep documentation up-to-date unless no one's going to read it anyway.
  • Use TDD, but don't both to hook up CI.
  • Hire a ScrumMaster (certified of course), and then tell him/her what to do on the team, based on your (uncertified) ideas of scrums from all those rugby games you watched last year.
  • Test files should exist to give the appearance of caring and design.
  • Popular libraries should be included to give the appearance of being cutting-edge.
  • Always use the words agile, rock start, and ninja in your job ads whether they apply to your existing team or not
@btaitelb
btaitelb / gist:4375301
Created December 25, 2012 20:42
enabling vim keybindings in sublime text 2
  • Preferences -> Settings - User (Cmd-, in osx)
  • add "ignored_packages": [] (don't forget the commas at the end of lines)
  • save
  • now you see INSERT MODE in the lower left corner
  • hit ESC to get to COMMAND MODE. You can use vim commands like :w for save, and navigation keys like j,k,h,l
  • now hit i to get back to INSERT MODE, and use your favorite emacs key bindings, like C-a and C-e
@btaitelb
btaitelb / gist:5149527
Created March 13, 2013 05:06
cakephp on rack-legacy
>> Thin web server (v1.5.0 codename Knife)
>> Maximum connections set to 1024
>> Listening on 0.0.0.0:9292, CTRL+C to stop
!! Unexpected error while processing request: Content-Length header was 4005, but should be 7895
127.0.0.1 - - [13/Mar/2013 01:04:24] "GET HTTP/1.1" 404 4005 0.2757
@btaitelb
btaitelb / gist:5359668
Created April 11, 2013 00:27
rake test in sprockets-rails (commit 1608217, master at time of gist)
Run options:
# Running tests:
/Users/btaitelb/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/test/unit.rb:707:in `block in _prepare_run': undefined method `size' for #<ParallelEach:0x007fcebca02c00> (NoMethodError)
from /Users/btaitelb/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/test/unit.rb:707:in `each'
from /Users/btaitelb/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/test/unit.rb:707:in `inject'
from /Users/btaitelb/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/test/unit.rb:707:in `_prepare_run'
from /Users/btaitelb/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/test/unit.rb:648:in `_run_suites'
from /Users/btaitelb/.rvm/gems/ruby-2.0.0-p0@sprockets-rails/gems/minitest-4.7.1/lib/minitest/unit.rb:861:in `_run_anything'

Keybase proof

I hereby claim:

  • I am btaitelb on github.
  • I am benji (https://keybase.io/benji) on keybase.
  • I have a public key whose fingerprint is 6C52 F9C2 5596 2CC1 F4C9 9A6B 3D03 B326 DAF1 D7E7

To claim this, I am signing this object:

@btaitelb
btaitelb / wp_domain_count.rb
Created May 7, 2014 19:20
How many recently visited domains used wordpress?
#!/usr/bin/env ruby
## Dependencies:
## * curl
## * jq (not really needed, but I like it)
## * sqlite
## * quit chrome before running this since the History file is locked
require 'uri'