Skip to content

Instantly share code, notes, and snippets.

@alyssa
alyssa / gist:4423720
Created December 31, 2012 23:09
Top CS schools in a ruby array
top_cs_schools = ["Carnegie Mellon University", "Massachusetts Institute of Technology", "Stanford University", "University of California--Berkeley", "Cornell University", "University of Illinois--Urbana-Champaign", "University of Washington", "Princeton University", "University of Texas--Austin", "Georgia Institute of Technology", "California Institute of Technology", "University of Wisconsin--Madison", "University of Michigan--Ann Arbor", "University of California--Los Angeles", "University of California--San Diego", "University of Maryland--College Park", "Columbia University", "Harvard University", "University of Pennsylvania", "Brown University", "Purdue University--West Lafayette", "Rice University", "University of Massachusetts--Amherst", "University of North Carolina--Chapel Hill", "University of Southern California", "Yale University", "Duke University", "Johns Hopkins University", "New York University", "Ohio State University", "Pennsylvania State University--University Park", "Rutgers, the State Un
@josephwecker
josephwecker / new_bashrc.sh
Created August 11, 2012 04:36
Replace .bashrc, .bash_profile, .profile, etc. with something much more clean, consistent, and meaningful. Now a repo: https://github.com/josephwecker/bashrc_dispatch
#!/bin/bash
# License: Public Domain.
# Author: Joseph Wecker, 2012
#
# -- DEPRICATED --
# This gist is slow and is missing .bashrc_once
# Use the one in the repo instead! https://github.com/josephwecker/bashrc_dispatch
# (Thanks gioele)
#
# Are you tired of trying to remember what .bashrc does vs .bash_profile vs .profile?
@avdi
avdi / apology101.markdown
Created March 22, 2012 17:36
How to apologize

Chances are your head's spinning right now. That accusation of bias caught you off guard, you got kind of defensive, and now all hell has broken loose. You're feeling attacked on all sides. You're a good person at heart, and having all these people treat you like the antichrist is pretty upsetting.

You need to say something, but you're probably not in the best headspace to write copy right now. So to help you along, here's my 100% guaranteed-or-you-money-back scandal defusement apology template:

@liaody
liaody / coffeescript_gotcha.md
Created January 12, 2012 01:56
Coffeescript gotchas when migrating from javascript

Here are some of the "gotchas" I've encountered when I converted all the javascript code into coffeescript. (BTW, this is gathered while coding for YourMechanic.com, a very cool mobile auto repair service.)

Disclaimer: Coffeescript is a great productivity booster for me personally. Even with all the things outlined below, it is still way better than javascript. None of these should discourage you from jumping into it right away.

Major gotchas

(Things that generate wrong code silently)

@vivien
vivien / coderwall.rb
Created June 4, 2011 04:50
Simple and Stupid Ruby API for Coderwall.com
# Simple and Stupid Ruby API for Coderwall.com
# Vivien Didelot <vivien@didelot.org>
require "open-uri"
require "json"
module CoderWall
class Achievement
attr_reader :name, :badge, :description