Skip to content

Instantly share code, notes, and snippets.

View ignu's full-sized avatar
🏳️‍🌈
interested in: react/typescript rails/ruby elixir & graphql

Leonard Smith ignu

🏳️‍🌈
interested in: react/typescript rails/ruby elixir & graphql
View GitHub Profile
@ignu
ignu / colbert_report.rb
Created July 26, 2011 17:45
Colbert Report Ticket Notifier
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/)
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)");
@ignu
ignu / gist:1015460
Created June 8, 2011 21:30
RVM broken on zsh using ubuntu
☁ ~ 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:~#
@ignu
ignu / gist:822804
Created February 11, 2011 18:43
podcasts
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:
@ignu
ignu / vim.rb
Created December 13, 2010 23:50 — forked from uasi/vim.rb
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
class BaseThing
end
class A < BaseThing end
class B < BaseThing end
case basething
when A:
redirect_to a_path(basething)
when B:
namespace FakeIt.Specs
{
public class Customer
{
public string Name { get; set; }
}
[TestFixture]
public class BluePrintSpecs
require 'httparty'
require 'ruby-growl'
class FedEx
include HTTParty
format :html
class << self
@status, @location = nil, nil
var myObject = function() {
var firstname; // my closure var
var self = {};
self.setFirstName = function(fname) {
firstname = fname
};
return self;
}
[TestFixture]
public class WebServiceTest
{
[Test]
public void should_call_authentication_service()
{
service.MyMethod();
Verify<IAuthenticationService>(a => a.Authenticate(username, password)).WasCalled();
}
}