Skip to content

Instantly share code, notes, and snippets.

View georgeu2000's full-sized avatar
💭
Status: Hood

George georgeu2000

💭
Status: Hood
View GitHub Profile
function headerValues(){
return $( '#jsGrid' ).data( 'JSGrid' )
.fields
.filter( function( d ){
return d.name != '';
})
.map( function( d ){
return d.name
})
}
@georgeu2000
georgeu2000 / gist:034a8de58402ac33436aa1c967f4eac7
Created July 13, 2016 17:24
How to connect to Postgres DB with Active Record without Rails
db_config = YAML.load( ERB.new( File.read( "config/postgres.yml" )).result )
ActiveRecord::Base.establish_connection( db_config[ ENV[ 'RACK_ENV' ]])
@georgeu2000
georgeu2000 / Data
Last active August 29, 2015 14:03
Data for Correlation
Decile Independent Variable Dependent Variable
1 -6.363525939 0.02950219728
2 -3.620811845 -0.5916029083
3 -2.119305936 0.5039044438
4 -0.7828944705 -0.07579965689
5 0.5483736073 0.642124125
6 1.765507323 1.193357292
7 2.966217647 0.727289107
8 4.186309079 1.433569839
9 5.77593317 0.06166535553
class RomanNumeral
def self.to_arabic roman_number
add_roman roman_number
end
private
def self.add_roman roman_number
class RomanNumeral
def self.add_roman(roman_number)
result = 0
roman_number.each_char do |c|
result += roman_lookup(c)
end