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 'osx/cocoa' | |
include OSX | |
class NotificationHandler < NSObject | |
def initialize | |
c = NSDistributedNotificationCenter.defaultCenter | |
c.addObserver_selector_name_object(self, :notification, 'com.apple.iTunes.playerInfo', nil) | |
end | |
def notification(n) |
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
# Perfect Paper Passwords v3 | |
# For more info see http://grc.com/ppp | |
# | |
# The MIT License | |
# | |
# Copyright (c) 2009 Jonathan Rudenberg | |
# Original version by Gavin Stark (http://is.gd/lYIf) | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal |
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
# Ruby ASR Weather for Tropo | |
# Copyright 2009 Jonathan Rudenberg | |
# Licensed under the MIT License | |
# | |
# Requires a Yahoo! App ID and WeatherBug API Key | |
# http://developer.yahoo.com/maps/rest/V1/geocode.html | |
# http://weather.weatherbug.com/desktop-weather/api.html | |
# | |
# Try it out by calling 1-312-957-8992 |
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 'twiliolib' | |
# Twilio REST API version | |
API_VERSION = '2008-08-01' | |
# Twilio AccountSid and AuthToken | |
ACCOUNT_SID = 'AC79a4b3609b05ee750cf0844e330cd11b' # FAKE | |
ACCOUNT_TOKEN = '1d1b9c34c3a40f5c6ba501775ba1f86b' # FAKE |
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
" Vim color scheme | |
" | |
" Name: twilight.vim | |
" Maintainer: Jonathan Rudenberg <[email protected]> | |
" License: MIT | |
" | |
" A GUI only vim theme based on the Twilight TextMate theme. | |
" Original structure taken from railscasts.vim [1]. | |
" Some parts of this theme were borrowed from the well-documented Lucius theme [2]. | |
" |
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 | |
# twail.rb | |
# Twitter stream tail | |
# Copyright 2010 Jonathan Rudenberg | |
# Licensed under the MIT License | |
# | |
# Prerequisites: gem install json twitter-stream | |
require 'optparse' |
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
subject(/Ticket/).to(':[email protected]') do | |
User.find_by_identifier(params[:user]).add_ticket(message) | |
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
def mask n;n[0,6]+'*'*(n.size-10)+n[-4,4]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 FunWithBlocks | |
attr_accessor :block | |
def test_helper | |
puts 'I am a really useful helper' | |
end | |
def run_block | |
instance_exec('arg!', &@block) |
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
# -*- coding: utf-8 -*- | |
""" | |
pygments.styles.twilight | |
~~~~~~~~~~~~~~~~~~~~~~~~ | |
A clone of the Twilight style from TextMate. | |
""" | |
from pygments.style import Style | |
from pygments.token import Keyword, Name, Comment, String, Error, \ |
OlderNewer