Skip to content

Instantly share code, notes, and snippets.

View therealjasonkenney's full-sized avatar

Jason Kenney therealjasonkenney

  • Boston
  • 01:49 (UTC -04:00)
View GitHub Profile

Keybase proof

I hereby claim:

  • I am therealjasonkenney on github.
  • I am therealjasonk (https://keybase.io/therealjasonk) on keybase.
  • I have a public key ASDRZfNTcGvVagJVN8QCyPqV2YXdQWMqIgn19t4CamIqPgo

To claim this, I am signing this object:

module Etl
module CasUrl
class UnsuccessfulResponseError < ::StandardError; end
class Base
private_class_method :new
private
# include <stdio.h>
#
#
int main(void) {
float a = 0.4;
float b = 0.5;
float c = 0.1;
float d = b - a - c;
#!env ruby
class Address
attr_accessor :street1, :street2, :city, :state, :zip
def initialize(attributes = {})
attributes.each do |k,v|
self.send(:"#{k}=", v)
end
@therealjasonkenney
therealjasonkenney / game_of_code
Created March 13, 2014 01:44
In the game of code...
#!/usr/bin/perl
sub win() {
print "Do the right thing? (Y/N) ";
return <STDIN> =~ /^[Nn](O|o|)$/;
}
1 while win or die;
@therealjasonkenney
therealjasonkenney / account.rb
Created December 14, 2013 03:02
Taking a domain out of rails example.
# The Database model, it does
# validation that is required for db integrity.
class User < ActiveRecord::Base
validates :presence => :email
end
# Just your average active model, this one handles a login.
# This assumes a railtie that provides a Validator class which takes domain
# as an argument and passes the Login class with its associations to
# the domain class.
@therealjasonkenney
therealjasonkenney / gist:6269751
Created August 19, 2013 14:28
Hours log file.
2013-08-19 00:31:24 200 0.248
2013-08-19 00:32:25 200 0.586
2013-08-19 00:33:25 200 0.239
2013-08-19 00:34:26 200 0.560
2013-08-19 00:35:26 200 0.220
2013-08-19 00:36:28 200 1.727
2013-08-19 00:37:28 200 0.251
2013-08-19 00:38:29 200 1.551
2013-08-19 00:39:30 200 0.225
2013-08-19 00:40:30 200 0.560
@therealjasonkenney
therealjasonkenney / gist:5904962
Created July 1, 2013 21:52
JIRA Client Example
#!/usr/bin/perl -w
#
#
use Data::Dumper;
use JSON;
use REST::Client;
sub fetch_jira_query {
my ($encrypted_user_pass, $query) = @_;
my $host = 'https://liaison-intl.atlassian.net';