This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env ruby | |
| # | |
| # hey! a minimalist CRM for http://todotxt.com/ | |
| # | |
| # hey tells you one thing you should do regularly, but haven't done lately. | |
| # | |
| # $ todo.sh lf hey | |
| # 1 @phone Mom (+1 234 567 8901) +family | |
| # 2 @skype Dad +family | |
| # 3 @email mentor |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <arpa/inet.h> | |
| #include <errno.h> | |
| #include <netdb.h> | |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <strings.h> | |
| #include <dns_sd.h> | |
| void callback(DNSServiceRef sdRef, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| NUM_POOLS = 5 | |
| Grad = Struct.new :name, :gender, :region | |
| def norm_name first, last | |
| "#{first.strip} #{last.strip}" | |
| end | |
| def norm_gender gender | |
| {'M' => 'Male', 'F' => 'Female'}[gender] || gender |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| # | |
| # We have a few repeat customers here at the TWU 27 hotdog shack. | |
| # | |
| # They've decided it's FUN to visit our stand. | |
| # | |
| # So, we've cooked up something a little special for our valued customers. | |
| set -e |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| Retarded simple event-binding "DSL" | |
| Best with: | |
| * jQuery (or Zepto) | |
| * event_emitter | |
| https://github.com/ajaxorg/ace/blob/master/lib/ace/lib/event_emitter.js | |
| Usage: | |
| tie($(window), "hashchange") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # | |
| # The hair colors of Australian fashion models | |
| # | |
| import json | |
| import re | |
| import urllib.request | |
| API = 'http://en.wikipedia.org/w/api.php?%s' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Describe "Logging In" do | |
| Context "Successful Login" do | |
| before do | |
| User.create(:username => "Scott", :password => "Tiger") | |
| visit :login_page | |
| on_page_with(:login_form) do |login_form| | |
| login_form.login("Scott", "Tiger") | |
| end | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env ruby | |
| require 'rubygems' | |
| require 'blinky' | |
| l = Blinky.new.light | |
| module Blinky | |
| module GoCiServer | |
| def get_server_locations |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| # The most important line in any shell program. | |
| # | |
| # Sometimes, though, I wish it worked in the [shebang][]. | |
| set -e | |
| file="$1" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| # | |
| # YO DAWG I HERD U LIKE ORDER-DEPENDENT TESTS? | |
| # | |
| # SO I PUT ORDER-DEPENDENT EXAMPLES N UR ORDER-DEPENDENT SPECS | |
| # SO U CAN B NON-DETERMINISTIC WHILE UR NON-DETERMINISTIC | |
| # | |
| # http://memegenerator.net/instance/11059517 | |
| function die () { |