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 'open-uri' | |
require "net/http" | |
require "uri" | |
# Change this | |
username = "fancypants" | |
# Set these up |
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
function HowFar( $p1, $p2 ){ | |
// WGS-84 Ellipsoid | |
$a = 6378137; | |
$b = 6356752.3142; | |
$f = 1/289.257223563; | |
$L = $p2->GetLong() - $p1->GetLong(); | |
$U1 = atan( ( 1 - $f ) * tan( $p1->GetLat() ) ); | |
$U2 = atan( ( 1 - $f ) * tan( $p2->GetLat() ) ); |
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
NSArray *books_and_chapters = @{@"Genesis" : @"50", | |
@"Exodus" : @"40", | |
@"Leviticus" : @"27", | |
@"Numbers" : @"36", | |
@"Deuteronomy" : @"34", | |
@"Joshua" : @"24", | |
@"Judges" : @"21", | |
@"Ruth" : @"4", | |
@"1 Samuel" : @"31", | |
@"2 Samuel" : @"24", |
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
MORSE_CODE_DICTIONARY = { | |
"a" => ".-", | |
"b" => "-...", | |
"c" => "-.-.", | |
"d" => "-..", | |
"e" => ".", | |
"f" => "..-.", | |
"g" => "--.", | |
"h" => "....", | |
"i" => "..", |
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 -E utf-8 | |
# merge_asana_into_omnifocus.rb | |
# Hilton Lipschitz | |
# http://www.hiltmon.com | |
# Use and modify freely, attribution appreciated | |
# Script to import Asana projects and their tasks into | |
# OmniFocus and keep them up to date from Asana. |
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
if (typeof Object.create !== 'function') { | |
Object.create = function (o) { | |
var F = function() {}; | |
F.prototype = o; | |
return new F(); | |
}; | |
} | |
var CarouselBase = function(){}; | |
CarouselBase.prototype.cycle_interval = 15000; |
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
libtool: install: /usr/bin/install -c .libs/libmemcached.lai /Users/jeffmcfadden/.rvm/gems/ruby-1.9.2-p0@rails3/gems/memcached-1.0.1/ext/lib/libmemcached.la | |
libtool: install: /usr/bin/install -c .libs/libmemcached.a /Users/jeffmcfadden/.rvm/gems/ruby-1.9.2-p0@rails3/gems/memcached-1.0.1/ext/lib/libmemcached.a | |
libtool: install: chmod 644 /Users/jeffmcfadden/.rvm/gems/ruby-1.9.2-p0@rails3/gems/memcached-1.0.1/ext/lib/libmemcached.a | |
libtool: install: ranlib /Users/jeffmcfadden/.rvm/gems/ruby-1.9.2-p0@rails3/gems/memcached-1.0.1/ext/lib/libmemcached.a | |
---------------------------------------------------------------------- | |
Libraries have been installed in: | |
/Users/jeffmcfadden/.rvm/gems/ruby-1.9.2-p0@rails3/gems/memcached-1.0.1/ext/lib | |
If you ever happen to want to link against installed libraries | |
in a given directory, LIBDIR, you must either use libtool, and |
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
Building native extensions. This could take a while... | |
ERROR: Error installing memcached: | |
ERROR: Failed to build gem native extension. | |
/Users/jeffmcfadden/.rvm/rubies/ruby-1.9.2-p0/bin/ruby extconf.rb | |
Building libmemcached. | |
tar xzf libmemcached-0.32.tar.gz 2>&1 | |
Patching libmemcached source. | |
patch -p1 -Z < libmemcached.patch | |
patching file libmemcached-0.32/libmemcached/memcached_response.c |
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 Peter | |
def isTired? | |
hadClassToday? && Time.now.hour > 22 | |
end | |
def hadClassToday? | |
true unless ( Time.now.wday == 0 || Time.now.wday == 6 ) | |
end | |
def status |
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
// ==UserScript== | |
// @name growl-notifications | |
// @namespace http://fluidapp.com | |
// @description What does this do? | |
// @include * | |
// @author Someone | |
// ==/UserScript== | |
//Jquery: | |
/*! |
OlderNewer