Skip to content

Instantly share code, notes, and snippets.

View nerdyworm's full-sized avatar
:shipit:
distracted like an adhd squirrel

Benjamin Rhodes nerdyworm

:shipit:
distracted like an adhd squirrel
View GitHub Profile
$('.progress-bar').click(function(e) {
var playingSound = soundManager.getSoundById(_.keys(soundManager.sounds)[0]),
x = e.pageX - $(this).offset().left,
width = $(this).width(),
duration = playingSound.durationEstimate;
playingSound.setPosition((x / width) * duration);
});
@nerdyworm
nerdyworm / account.json
Created April 27, 2012 15:51
account dump
{
"company_custom_field_labels": [
{
"account_id": 1,
"custom_field_label_dropdown_entries": [],
"custom_field_template_id": null,
"default_value": null,
"deleted_at": null,
"derivable_column": null,
"derivable_type": null,
class Game
def initialize
@cards = (1..21).collect { |i| i.to_s }
@solutions = @cards.clone
end
def play
begin
play_turn
end while @solutions.size > 1
// GET /people/2.json
{
"id": 2,
"first_name": "Captain",
"email": "CaptainCrunch@nerdyworm.com"
"last_name": "Crunch",
"custom_fields": {
"abilities": [
"sugar_rush"
],
//Mike Schmitt
//calculates the amount of time it will take to travel a given distance at a given speed.
#include <cstdlib>
#include <iostream>
using namespace std;
int main()
{
{
"tags": [{
"name": "Decision Maker",
"id": 12
},
"name": "Partner",
"id": 14
}],
"user": {
"full_name": "Benjamin Rhodes",
# Javascript
assets/javascripts/
# Backbone App
assets/javascripts/app/
assets/javascripts/app/application.js # javascript entry point
assets/javascripts/app/document_ready.js # single document ready entry point (i can dream right?)
# Vendor Extentsions
assets/javascripts/ext/{backbone,jquery,jquery-ui} # our hacks basically
// Mike Schmitt (Class #12109)
// Assignment #1
// My First Program
#include <cstdlib>
#include <iostream>
using namespace std;
int dog_years(int years)
{
"pagination": {
"total_entries": 147,
"page_var": "page",
"total_in_account": null,
"url": "http://localhost:8080/deals.json?associations=people,notes,companies\u0026per_page=1",
"current_page": 1,
"per_page": 30
},
"deals": [{
/deals.json?associations=people,notes,companies&per_page=1
[{
"notes": [{
"created_at": "2012/01/06 16:41:00 -0500",
"created_by_user": {
"full_name": "Benjamin Rhodes",
"id": 1
},
"updated_at": "2012/01/06 17:03:43 -0500",
"note_category": {