Skip to content

Instantly share code, notes, and snippets.

{
"status":"OK",
"copyright":"Copyright (c) 2015 The New York Times Company. All Rights Reserved.",
"section":"politics",
"last_updated":"2015-12-28T12:35:04-05:00",
"num_results":25,
"results":[
{
"section":"U.S.",
"subsection":"Politics",
{"status":"OK","copyright":"Copyright (c) 2015 The New York Times Company. All Rights Reserved.","section":"politics","last_updated":"2015-12-28T12:35:04-05:00","num_results":25,"results":[{"section":"U.S.","subsection":"Politics","title":"How Hillary Clinton Went Undercover to Examine Race in Education","abstract":"Mrs. Clinton\u2019s work, as a young law student in 1972, to determine whether an Alabama school discriminated against blacks was a moment of awakening for her.","url":"http:\/\/www.nytimes.com\/2015\/12\/28\/us\/politics\/how-hillary-clinton-went-undercover-to-examine-race-in-education.html","byline":"By AMY CHOZICK","item_type":"Article","updated_date":"2015-12-27T07:59:33-5:00","created_date":"2015-12-27T07:59:36-5:00","published_date":"2015-12-28T00:00:00-5:00","material_type_facet":"News","kicker":"","des_facet":["Presidential Election of 2016","Segregation and Desegregation","Discrimination","Race and Ethnicity"],"org_facet":["Children's Defense Fund"],"per_facet":["Clinton, Hillary Rodham",
@thenickcox
thenickcox / temperature_sensor.ino
Created September 18, 2015 14:44
temperature_sensor.ino
const int temperaturePin = 0;
const float maxHighTemp = 72.0,
minLowTemp = 66.0,
voltageConversion = 0.004882814;
float getVoltage(int pin){
return (analogRead(pin) * voltageConversion);
}
int pinsInUse[] = {13, 7};
class WhinyOpenStruct < OpenStruct
def method_missing(method, *args, &block)
raise ArgumentError.new "I don't have a #{method}, make sure it was passed in!"
end
end
module PersonDetails
class PeopleController < PersonDetails::ApplicationController
respond_to :json, only: :show
def show
respond_to do |format|
format.json do
@person = OpenStruct.new(person_details)
render :show
end
module Employment
module Services
class EmployerInfoService
def self.get_employment_info_for(patient_id)
{
employer_name: 'Acme Fireworks Co.',
employer_address: '123 Anywhere St.',
employer_phone: '206-555-3535',
employer_industry: 'Entertainment'
}
@thenickcox
thenickcox / person_profile_service.rb
Last active August 29, 2015 14:22
person_profile_service.rb
module Services
class PersonProfileService
def get_overview(person_id)
{
employer_id: 1,
first_name: 'Michael',
last_name: 'Jackson',
is_registered: true,
mobile_phone: '223-123-1234',
avatar_url: 'http://placehold.it/120x120'
App.Models.Album = Backbone.Model.extend()
`event domSelector`: `methodInThisObjectToBeCalled`