🏳️🌈
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
| require 'rubygems' | |
| require 'ruby-growl' | |
| require 'net/http' | |
| comedy_central = Net::HTTP.new('impresario.comedycentral.com', 80) | |
| growl = Growl.new "localhost", "ruby-growl", ["Colbert Report Tickets"] | |
| growl.notify "Colbert Report Tickets", "Colbert Report Ticket Notifer", "You'll be alerted when tickets are available." | |
| while true do | |
| unless(comedy_central.get("/show/5b2eb3b0eb99f143", nil).body =~ /there are no tickets available/) |
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
| window.ConsoleDay = Backbone.Model.extend({ | |
| initialize: function() { | |
| _.bindAll(this, 'addWearing', 'addWearings', 'updateWearingsCount', 'getDiv'); | |
| this.wearings = new WearingCollection; | |
| this.wearings.url = "/days/" + this.get("date") + "/wearings"; | |
| this.wearings.bind("add", this.updateWearingsCount); | |
| this.wearings.fetch(); | |
| }, | |
| updateWearingsCount : function() { | |
| this.getDiv().find(".item_count").text("(" + this.wearings.length + " items)"); |
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
| ☁ ~ rvm use ree | |
| Using /usr/local/rvm/gems/ree-1.8.7-2011.03 | |
| ☁ ~ ruby -v | |
| ruby 1.8.7 (2010-08-16 patchlevel 302) [i686-linux] | |
| ☁ ~ bash | |
| root@li285-163:~# rvm use ree | |
| Using /usr/local/rvm/gems/ree-1.8.7-2011.03 | |
| root@li285-163:~# ruby -v | |
| ruby 1.8.7 (2011-02-18 patchlevel 334) [i686-linux], MBARI 0x8770, Ruby Enterprise Edition 2011.03 | |
| root@li285-163:~# |
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 Ruby Show The Ruby Show http://feeds.feedburner.com/railsenvy-podcast | |
| Briefly Awesome A weekly rundown of what's cool, new, and interesting in the world of web, mobile, social media, and entertainment. If it's awesome, it's here. Hosted by Christina Warren and Dan Benjamin. http://feeds.feedburner.com/brieflyawesome | |
| The Big Web Show The Big Web Show features special guests and topics like web publishing, art direction, content strategy, typography, web technology, and more. It's everything web that matters. Hosted by Dan Benjamin and Jeffrey Zeldman. http://feeds.feedburner.com/bigwebshow | |
| The Talk Show The Talk Show features discussion about technology, Apple, Mac, iPhone, iPad, movies, directors, and the Web. Hosted by Dan Benjamin and John Gruber. http://feeds.feedburner.com/thetalkshow | |
| The Pipeline The Pipeline is an interview show, featuring in-depth conversations with innovators, designers, geeks, newsmakers, entrepreneurs, and people who create amazing things. Hosted by Dan Benjamin. http: |
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
| require 'formula' | |
| class Vim <Formula | |
| url 'ftp://ftp.vim.org/pub/vim/unix/vim-7.3.tar.bz2' | |
| homepage 'http://www.vim.org/' | |
| md5 '5b9510a17074e2b37d8bb38ae09edbf2' | |
| def patchlevel; 81 end | |
| def features; %w(tiny small normal big huge) end | |
| def interp; %w(lua mzscheme perl python python3 tcl ruby) 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
| class BaseThing | |
| end | |
| class A < BaseThing end | |
| class B < BaseThing end | |
| case basething | |
| when A: | |
| redirect_to a_path(basething) | |
| when B: |
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
| namespace FakeIt.Specs | |
| { | |
| public class Customer | |
| { | |
| public string Name { get; set; } | |
| } | |
| [TestFixture] | |
| public class BluePrintSpecs |
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
| require 'httparty' | |
| require 'ruby-growl' | |
| class FedEx | |
| include HTTParty | |
| format :html | |
| class << self | |
| @status, @location = nil, nil |
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
| var myObject = function() { | |
| var firstname; // my closure var | |
| var self = {}; | |
| self.setFirstName = function(fname) { | |
| firstname = fname | |
| }; | |
| return self; | |
| } | |
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
| [TestFixture] | |
| public class WebServiceTest | |
| { | |
| [Test] | |
| public void should_call_authentication_service() | |
| { | |
| service.MyMethod(); | |
| Verify<IAuthenticationService>(a => a.Authenticate(username, password)).WasCalled(); | |
| } | |
| } |