This file contains 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
. |
This file contains 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
# To test this out, call: | |
# (206) 357-6220 x33684 or | |
# sip:2063576220@vox4.cloudvox.com x33684 | |
default { | |
if calleridname != 'Not available' | |
name = calleridname | |
end | |
text = "Hello #{name}, I think you're calling from #{callerid}" |
This file contains 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
{"$id":"1","Error":"This salt has already been used in the last 8 hour period"} |
This file contains 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
Manifest-Version: 1.0 | |
Implementation-Vendor: net.lag | |
Implementation-Title: kestrel | |
Implementation-Version: 2.4.1 | |
Implementation-Vendor-Id: net.lag | |
Class-Path: libs/scala-library.jar libs/ostrich-8.2.9.jar libs/scala-j | |
son-3.0.1.jar libs/util-core-5.3.13.jar libs/util-eval-5.3.13.jar lib | |
s/scala-compiler.jar libs/util-logging-5.3.13.jar libs/util-jvm-5.3.1 | |
3.jar libs/naggati_2.9.2-4.1.0.jar libs/finagle-core-5.3.19.jar libs/ | |
netty-3.5.5.Final.jar libs/util-collection-5.3.13.jar libs/jsr305-1.3 |
This file contains 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
package main | |
import ( | |
"testing" | |
"sync" | |
"sync/atomic" | |
) | |
func TestOneBarrier(t *testing.T) { | |
expected := int32(2) |
This file contains 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
# From Edge Rails | |
class Object | |
unless public_method_defined?(:present?) | |
def present? | |
!blank? | |
end | |
end | |
end |
This file contains 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
# Parallel map | |
# Originally from http://project.ioni.st/post/2332#snippet_2332 | |
class Array | |
def pmap | |
threads = [] | |
0.upto(size - 1) do |n| | |
threads << Thread.new do | |
yield(at(n)) | |
end | |
end |
This file contains 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
# | |
# Created by Eric Lindvall <eric@5stops.com> | |
# | |
# Making it simple to provide input for http://wordle.net/create | |
# | |
# | |
require 'rubygems' | |
gem 'mechanize' | |
require 'mechanize' |
This file contains 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 'open-uri' | |
require 'hpricot' | |
class Gistr | |
def initialize(gist_id) | |
@gist_id = gist_id | |
end | |
def post(email, password, title) | |
post_to_tumblr(email, password, title, gist_code) |
This file contains 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 CreditCardType < ActiveRecord::Base | |
acts_as_enumeration :lookup_name | |
column :name | |
def initialize(attributes = nil) | |
super | |
self.lookup_name ||= name.to_s.gsub(/[^A-Za-z0-9-]/, '').underscore | |
end | |
create :id => 1, :name => 'Visa' |
OlderNewer