Skip to content

Instantly share code, notes, and snippets.

View KeithHanson's full-sized avatar

Keith Hanson KeithHanson

View GitHub Profile
@KeithHanson
KeithHanson / demo.rb
Created December 4, 2009 19:37
Demo App for Fremont Consulting
require 'rubygems'
require 'sinatra/base'
require 'mongomapper'
require 'faker'
MongoMapper.database = 'demo'
# MongoMapper Model with fields defined.
class RandomRecord
include MongoMapper::Document
class myfirstjavaprog
{
public static void main(String args[])
{
System.out.println("Hello World!");
}
}
"Despite threats from militants, the historic voting for presidential elections -- the second in Afghanistan's history -is underway without any serious disruption. Voters gathered to an establish government which can bring peace and security. THE HISTORIC voting for presidential elections -- the second in Afghanistan's history \342\200\223is underway without any serious disruption. The polling began at 7 am (local time) in several provinces. Simultaneously, millions of registered voters are electing 34 provincial councils. In the Taliban heartland of Helmand, voters gathered at a government high school in Lashkargah, the provincial capital without any fear. They say they want an established government, which can bring peace and security in the country. Also in the southern Kandahar province where the Taliban insurgents had warned to disrupt the election security and cut off the finger with the indelible ink, which is marked for avoiding multiple voting, the polling process was going smoothly. The people, men
It will cost joo ten billion nickels
I abhor j00
It's beautiful to encounter you this beautiful day, Sunday October 28, 2302, to b exact
It will cost j00 ten hundred billion dollars
I am nuts about ju
I execrate j00
Oh, Hello There yoo.
It's fantastic to encounter you this horrible night, Sunday October 36, 2024, to be exact
On Friday I'm seeing your son
It will cost j00 eight hundred million dimes
Area_SqKm,Shape_Le_1,Shape_Area,Prov_34_Na,Objectid 1,Hectares,Prov 34,Objectid,Shape_Leng,,
4600.78572456,4.13362464961,0.452232194323,Kabul,1,460078.572456,1,1,4.13362464347,34.5259160975803,69.3891614929248
var testing = "huzzah?";
var admin_panel = '\
#test \n\
#inner_test \n\
#inner_test \n\
%p '+ testing +' \n\
';
(rdb:1) self["coordinates"][1] == other["coordinates"][1]
false
(rdb:1) self["coordinates"][1]
{"x"=>966.296291314453, "y"=>99.059047744874, "order_number"=>1}
(rdb:1) other["coordinates"][1]
{"x"=>966.296291314453, "y"=>99.059047744874, "order_number"=>1}
(rdb:1) {"x"=>966.296291314453, "y"=>99.059047744874, "order_number"=>1} == {"x"=>966.296291314453, "y"=>99.059047744874, "order_number"=>1}
true
function splitAndScoreText(results, text, score) {
if (text != null) {
var words = text.replace(/[^\w]+/g," ").toLowerCase().split(" ");
for (var word in words) {
if (words[word].length > 1) {
if ("a,about,an,and,are,as,at,be,by,from,how,i,in,is,it,of,on,or,that,the,this,to,was,we,what,when,where,which,with".search(words[word]) < 0) {
results[words[word]] = (results[words[word]] || 0) + score;
}
}
}
def merge(raw_cookies, uri = nil)
return unless raw_cookies
raw_cookies = raw_cookies.join("\n") if raw_cookies.class == Array
raw_cookies.split("\n").each do |raw_cookie|
cookie = Cookie.new(raw_cookie, uri, @default_host)
self << cookie if cookie.valid?(uri)
end
end
Loaded suite /usr/local/bin/monk
Started
EE
Finished in 0.033649 seconds.
1) Error:
test_renders_the_default_stylsheet(CssTest):
NoMethodError: undefined method `downcase' for nil:NilClass
/Users/keith/billable/skeleton/vendor/rack-test-0.4.1/lib/rack/test/cookie_jar.rb:27
/Users/keith/billable/skeleton/vendor/rack-test-0.4.1/lib/rack/test/cookie_jar.rb:127