Skip to content

Instantly share code, notes, and snippets.

### Keybase proof
I hereby claim:
* I am kahdojay on github.
* I am kahdojay (https://keybase.io/kahdojay) on keybase.
* I have a public key ASD4f1rTjHvRH78neINSE7tTa4PTP9qXMMMl_VGZYLXJoAo
To claim this, I am signing this object:
@kahdojay
kahdojay / README.md
Created April 13, 2017 18:42 — forked from leonardofed/README.md
A curated list of AWS resources to prepare for the AWS Certifications


A curated list of AWS resources to prepare for the AWS Certifications

A curated list of awesome AWS resources you need to prepare for the all 5 AWS Certifications. This gist will include: open source repos, blogs & blogposts, ebooks, PDF, whitepapers, video courses, free lecture, slides, sample test and many other resources.

For more about AWS and AWS Certifications and updates to this Gist you should follow me @leonardofed


$(function() {
$('.directUpload').find("input:file").each(function(i, elem) {
var fileInput = $(elem);
var form = $(fileInput.parents('form:first'));
var submitButton = form.find('input[type="submit"]');
var progressBar = $("<div class='bar'></div>");
var barContainer = $("<div class='progress'></div>").append(progressBar);
fileInput.after(barContainer);
fileInput.fileupload({
fileInput: fileInput,
class Sudoku
def initialize(board_string)
@original_string = board_string
@guess_cache = []
@board = []
board_string.split('').each_slice(9) { |row| @board << row.map {
|num| num.to_i } }
end
def solve!
@kahdojay
kahdojay / seeds.rb
Created February 8, 2015 03:07
openPAC code samples
include SeedHelper
include AlgorithmHelper
SeedHelper::LegislatorSeed::insert_basic_legislators
SeedHelper::LegislatorSeed::insert_details
SeedHelper::LegislatorSeed::insert_image_url
SeedHelper::AlgorithmData::create_issues(KEYWORDS)
SeedHelper::AlgorithmData::seed_algorithm_data
AlgorithmHelper::set_stance_values_for_bills
AlgorithmHelper::set_issue_score_for_legislators
@kahdojay
kahdojay / stances_controller.rb
Created February 8, 2015 02:56
openPAC code samples
class StancesController < ApplicationController
include AuthsHelper
def index
@stances = Stance.all.order("created_at DESC")[0..9]
@issues = Issue.all
end
def load
if params[:select] == "All"
@kahdojay
kahdojay / legislator.rb
Created February 8, 2015 02:54
openPAC code samples
class Legislator < ActiveRecord::Base
has_many :legislator_stances
has_many :stances, through: :legislator_stances
has_many :bill_votes
has_many :bills, through: :bill_votes
has_many :terms
has_one :alias
has_many :donations
has_many :legislator_issues
has_many :issues, through: :legislator_issues