Skip to content

Instantly share code, notes, and snippets.

View jerry's full-sized avatar

Jerry Richardson jerry

View GitHub Profile
<html>
<head>
<title>NanoGong Example</title>
<script language="JavaScript">
function submitVoice() {
// Find the applet object
var applet = document.getElementById("nanogong");
// Tell the applet to post the voice recording to the
// backend PHP code
diff --git a/app/controllers/record_controller.rb b/app/controllers/record_controller.rb
index 2be66f6..ec6af5f 100644
--- a/app/controllers/record_controller.rb
+++ b/app/controllers/record_controller.rb
@@ -4,7 +4,7 @@ class RecordController < ApplicationController
def index
end
-def submit_file
+def knobson
include Math
(10..99).each do |f|
fr = f.to_s.reverse.to_i
fsq = sqrt(f+fr)
p "#{f} + #{fr} = #{f + fr}" if fsq == fsq.floor
end
From bfb946c76fcd2d8801728fd31af77f8059a25a17 Mon Sep 17 00:00:00 2001
From: Christopher James Huff <cjameshuff@gmail.com>
Date: Mon, 28 Sep 2009 11:47:47 -0400
Subject: [PATCH] Added basic support for PayLeap gateway
---
lib/active_merchant/billing/gateways/payleap.rb | 228 +++++++++++++++++++++++
test/remote/gateways/remote_payleap_test.rb | 81 ++++++++
test/unit/gateways/payleap_test.rb | 85 +++++++++
3 files changed, 394 insertions(+), 0 deletions(-)
Loaded suite /Users/jerry/sites/rhv/test/functional/posts_controller_test
Started
..E.
Finished in 1.226551 seconds.
1) Error:
test: A signed in admin on POST to :create should redirect to the post page. (PostsControllerTest):
ActionController::RoutingError: post_url failed to generate from {:controller=>"posts", :action=>"show", :id=>nil}, expected: {:controller=>"posts", :action=>"show"}, diff: {:id=>nil}
method post_url in (eval) at line 16
method __bind_1264018691_837170 in posts_controller_test.rb at line 40
[user]
name = Jerry Richardson
email = jerry@disruptiveventures.com
[github]
user = jerry
token =
[color]
ui = auto
[color "branch"]
current = yellow reverse
function parse_git_dirty {
[[ $(git status 2> /dev/null | tail -n1) != "nothing to commit (working directory clean)" ]] && echo "*"
}
function parse_git_branch {
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e "s/* \(.*\)/[\1$(parse_git_dirty)]/"
}
export PS1='\u@\h \[\033[1;33m\]\w\[\033[0m\]$(parse_git_branch)$ '
alias ss='script/server'
alias e='mate .'
alias lsa="ls -alF"
Areaname,STCOU,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
UNITED STATES,00000,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
ALABAMA,01000,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
"Autauga, AL",01001,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
"Baldwin, AL",01003,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
"Barbour, AL",01005,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
"Bibb, AL",01007,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
"Blount, AL",01009,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
"Bullock, AL",01011,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
"Butler, AL",01013,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
@jerry
jerry / forecast.rb
Created September 20, 2010 19:38
Make It Rain
# app/models/forecast.rb
require 'httparty'
class Forecast < ActiveRecord::Base
include HTTParty
ICON_LOCATION = "http://mobile.wrh.noaa.gov/weather/images/fcicons"
class << self
@jerry
jerry / environment.rb
Created November 8, 2010 14:34
In Ruby on Rails, here's how you skip loading of ActiveRecord...
Rails::Initializer.run do |config|
config.frameworks -= [ :active_record ]
end