Requirements:
- Ruby, rubygems
- Octokit.rb installed
- SourceClear CLI agent installed
- Your GitHub access token available in your ENV as
GITHUB_TOKEN
class Hospital < AcitveRecord::Base | |
has_many :hospital_doctors | |
# Note: has_many_elsewhere is provided by the st-elsewhere gem | |
has_many_elsewhere :doctors, :through => :hospital_doctors | |
end | |
class HospitalDoctor < ActiveRecord::Base | |
belongs_to :hospital | |
belongs_to :doctor | |
end |
document.write("<div id='our-awesome-widget-target'></div>"); | |
var receivedForm = function(data) { | |
$("#our-awesome-widget-target").html(data["html"]); | |
} | |
$.ajax({ | |
url: 'http://example.com/something/<%= @some_key %>.json', | |
dataType: 'jsonp', | |
success: receivedForm | |
}); |
class SomeController < ApplicationController | |
# http://blog.jetthoughts.com/2010/12/22/allow-multiple-access-control-requests-for-rails/ | |
before_filter :set_access_control_headers | |
def show | |
@thing = Thing.find(params[:id]) | |
respond_to do |format| | |
format.html | |
format.json do | |
body = render_to_string(:locals => {:thing => @thing}) |
#!/usr/bin/env bash | |
# commit-derby | |
# Display a list of committers with the number of commits they have made in the last 30 days | |
# | |
COMMITTERS=`git log --format='%an' --since='30 days ago' | sort | uniq` | |
echo "In the last month, we've seen:" | |
for COMMITTER in ${COMMITTERS}; do | |
COMMITS=`git log --format='%an' --since='30 days ago' | sort | grep ${COMMITTER} | wc -l` |
Requirements:
GITHUB_TOKEN
This is Tom's thesis on Optimizing for Happiness, the core idea behind how we work: | |
http://tom.preston-werner.com/2010/10/18/optimize-for-happiness.html | |
Ryan has two really great pieces on GitHub management style and organization: | |
http://tomayko.com/writings/management-style | |
http://tomayko.com/writings/adopt-an-open-source-process-constraints | |
Zach has written and presented a ton on how GitHub works: | |
http://zachholman.com/talk/keeping-people/ | |
http://zachholman.com/posts/chat/ |
Brain Dump List (GTD) | |
What is on your desk? | |
What is in your bag? | |
What is in those piles? | |
What notes did you make in meetings? | |
What notes did you make on documents? | |
What email caught your attention? | |
What is coming up on your calendar? | |
What projects are close to shipping? |
<html> | |
<head> | |
<script src="http://code.jquery.com/jquery.js"></script> | |
<script src="jquery.twitter.min.js"></script> | |
<style type="text/css"> | |
body {background: #333; font-size: 64px; color: #999} | |
.twitter-posts {padding: 10px; list-style-type:none; border-bottom: 1px solid #000;} | |
.twitter-posts a {text-decoration:none; color: #FFF;} | |
</style> | |
<script type="text/javascript"> |
class Correlations | |
# the dataset in question | |
attr_writer :dataset | |
# Count the number of instances an individual term appears | |
# | |
# Example: | |
# {"Ruby" => 3, "PHP" => 2, "C++" => 2} | |
attr_accessor :total_appearance_count |
<html> | |
<head> | |
<!--Load the AJAX API--> | |
<script type="text/javascript" src="https://www.google.com/jsapi"></script> | |
<script type="text/javascript"> | |
// Load the Visualization API and the piechart package. | |
google.load('visualization', '1.0', {'packages':['corechart']}); | |
// Set a callback to run when the Google Visualization API is loaded. |