Skip to content

Instantly share code, notes, and snippets.

View samshull's full-sized avatar
🎯
Focusing

Sam Shull samshull

🎯
Focusing
View GitHub Profile
diff --git a/src/node-proxy.cc b/src/node-proxy.cc
index 545ce0c..34ade71 100644
--- a/src/node-proxy.cc
+++ b/src/node-proxy.cc
@@ -266,7 +266,7 @@ Handle<Value> NodeProxy::Create(const Arguments& args) {
instance->SetPrototype(args[1]);
}
- return scope.Close(instance);
+ return instance;
BenefitTemplate.where(:benefit_id => TERRORISM_ID).each { |bt| bt.update_attributes! :calculator_class => 'Terrorism' }
BenefitTemplate.where(:benefit_id => EMPLOYMENT_LAYOFF_ID).each { |bt| bt.update_attributes! :calculator_class => 'EmploymentLayoff' }
BenefitTemplate.where(:benefit_id => MEDICAL_EVACUATION_ID).each { |bt| bt.update_attributes! :calculator_class => 'MedicalEvacuationAndRepatriation' }
BenefitTemplate.where(:benefit_id => CANCEL_FOR_WORK_REASONS_ID).each { |bt| bt.update_attributes! :calculator_class => 'CancelForWorkReasons' }
BenefitTemplate.where(:benefit_id => HOME_COUNTRY_ID).each { |bt| bt.update_attributes! :calculator_class => 'HomeCountryCoverage' }
BenefitTemplate.where(:benefit_id => FINANCIAL_DEFAULT_ID).each { |bt| bt.update_attributes! :calculator_class => 'FinancialDefault' }
BenefitTemplate.find(134).update_attributes! :calculator_class => 'FinancialDefaultAfterWait'
BenefitTemplate.find(135).update_attributes! :calculator_class => '
BenefitTemplate.where(:benefit_id => TERRORISM_ID).each { |bt| bt.update_attributes! :calculator_class => 'Terrorism' }
BenefitTemplate.where(:benefit_id => EMPLOYMENT_LAYOFF_ID).each { |bt| bt.update_attributes! :calculator_class => 'EmploymentLayoff' }
BenefitTemplate.where(:benefit_id => MEDICAL_EVACUATION_ID).each { |bt| bt.update_attributes! :calculator_class => 'MedicalEvacuationAndRepatriation' }
BenefitTemplate.where(:benefit_id => CANCEL_FOR_WORK_REASONS_ID).each { |bt| bt.update_attributes! :calculator_class => 'CancelForWorkReasons' }
BenefitTemplate.where(:benefit_id => HOME_COUNTRY_ID).each { |bt| bt.update_attributes! :calculator_class => 'HomeCountryCoverage' }
BenefitTemplate.where(:benefit_id => FINANCIAL_DEFAULT_ID).each { |bt| bt.update_attributes! :calculator_class => 'FinancialDefault' }
Sent through our site
:"ad-d_upgrade"=>"none",
:agent_id_number=>56061394,
:beneficiary=>"Joe Someone",
:cbTerms=>"true",
:cc_city=>"Fort Wayne",
:cc_cvv=>"xxx",
:cc_month=>"January",
:cc_number=>"xxxxxxxxxxxxxxxx",
:cc_postalcode=>"46802",
array(54) {
[1]=>
array(8) {
[0]=>
string(1) "9"
[1]=>
string(2) "11"
[2]=>
string(2) "26"
[3]=>
<!doctype html>
<html>
<head>
<style>
* { margin: 0; padding: 0; }
html, body { height: 100%; min-height: 100%; min-width: 100%; }
#expanding-width-background { width: 100%; height: 100%; position: absolute; top: 0; z-index: 1; background: red; }
#fixed-width { width: 500px; height: 100%; position: relative; z-index: 2; margin: 0 auto; background: blue; }
</style>
</head>
@samshull
samshull / gist:4026233
Last active October 12, 2015 12:27
Iterative jQuery methods that use a single jQuery object for context to simplify usage
(function($){
$.fn.$each = function(callback) {
var $temp = $([1]);
return this.each(function() {
$temp[0] = this;
return callback.apply($temp, arguments);
});
};
@samshull
samshull / hack.sh
Created November 6, 2012 17:37 — forked from erikh/hack.sh
OSX For Hackers
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#
@samshull
samshull / gist:4026270
Created November 6, 2012 17:41
ranges that support unicode characters and dates (sort of)
(function() {
var StopIterator = this.StopIterator || function() { Error.apply(this, arguments); };
function Range(/*[start, ] stop [, step [, exclusive]]*/) {
var args = Array.prototype.slice.call(arguments, 0);
if (!(this instanceof Range)) return Range.apply(new Range(1), args);
switch(args.length) {
@samshull
samshull / gist:4046632
Created November 9, 2012 16:22
the metrics of numbers
module Metric
PREFIXES = {
:yotta => 8,
:zetta => 7,
:exa => 6,
:peta => 5,
:tera => 4,
:giga => 3,
:mega => 2,
:kilo => 1,