Skip to content

Instantly share code, notes, and snippets.

View objectiveSee's full-sized avatar

Danny Ricciotti objectiveSee

  • Starship Studios
View GitHub Profile
@objectiveSee
objectiveSee / gist:d7c7b0daa05f37e7c7ae
Created May 7, 2014 16:03
Forecast.IO API Sample Response
{
"latitude": 37.8267,
"longitude": -122.423,
"timezone": "America/Los_Angeles",
"offset": -7,
"currently": {
"time": 1399478531,
"summary": "Partly Cloudy",
"icon": "partly-cloudy-day",
"nearestStormDistance": 5,
var countNumberActiveUsersInRangeXDaysAgo = function (range_length_in_days, numDaysAgo_start) {
var deferred = Q.defer();
var startDate = new Date();
startDate.setDate(startDate.getDate() - numDaysAgo_start);
var s = ObjectID.createFromTime(startDate.getSeconds());
var endDate = new Date();
endDate.setDate(endDate.getDate() - numDaysAgo_start + range_length_in_days);
@objectiveSee
objectiveSee / package.json
Last active August 29, 2015 14:02
Burning Man 2014 Word Cloud Generation
{
"private": "true",
"name": "burnerwords",
"version": "v0.0.1",
"dependencies": {
"underscore": ">=1.4.4",
"optimist": "~0.3.5",
"read-json" : "~0.0.0",
"word-freq" : "~0.0.8"
}
require('../lib/globals.js');
function SerialDevice() {
return {
testObjectMethod: function() {
}
};
}
- (NSArray *)decks
{
id d = [self valueForKey:EAUserDecksArray];
if ( !d ) {
return @[];
}
return d;
}
@objectiveSee
objectiveSee / EAUser.h
Last active August 29, 2015 14:04
I am unable to observe KVO notifications for a derived property (decks) of the EAUser class. The code below never generate a notification when EAUserDecksArray is modified (which modifies decks). I can however make this work if I call will/DidChangeValueForKey: when the dependent property is changed, instead of implementing keyPathsForValuesAffe…
@interface EAUser : NSObject
- (NSArray *)decks;
@end
var w:CGFloat = 320
var h:CGFloat = 100
for ( var i = 0; i < 3; i++ ) {
let button = HEYButton(frame: CGRectMake(0, CGFloat(i) * h, w, h));
mkdir -p build/Debug/GNU-Linux-x86/_ext/1731549632
rm -f "build/Debug/GNU-Linux-x86/_ext/1731549632/Constants.o.d"
g++ -Wno-write-strings -c -g -I../Arduino/PyramidOfPossibilities -I../PlatformData -I../Arduino/libraries/RNChaser -I../Arduino/libraries/RNLights -I../Arduino/libraries/Accelerometer -I../Arduino/PyramidOfPossibilities -I. -I../Arduino/libraries/FastLED -std=c++11 -MMD -MP -MF "build/Debug/GNU-Linux-x86/_ext/1731549632/Constants.o.d" -o build/Debug/GNU-Linux-x86/_ext/1731549632/Constants.o ../Arduino/PyramidOfPossibilities/Constants.cpp
mkdir -p build/Debug/GNU-Linux-x86/_ext/1731549632
rm -f "build/Debug/GNU-Linux-x86/_ext/1731549632/Controller.o.d"
g++ -Wno-write-strings -c -g -I../Arduino/PyramidOfPossibilities -I../PlatformData -I../Arduino/libraries/RNChaser -I../Arduino/libraries/RNLights -I../Arduino/libraries/Accelerometer -I../Arduino/PyramidOfPossibilities -I. -I../Arduino/libraries/FastLED -std=c++11 -MMD -MP -MF "build/Debug/GNU-Linux-x86/_ext/1731549632/Controller.o.d" -o build/
struct RadialParameters {
unsigned long period = 5000; // duration of single cycle, in milliseconds.
float thickness = 200;
RNGradient gradientInside = RNGradient(0, RNGradientCapped, 0x880000, 0x884400);
RNGradient gradientShell = RNGradient(0, RNGradientCapped, 0xFF0000, 0x0000FF);
RNGradient gradientOutside = RNGradient(0, RNGradientCapped, 0x000088, 0x003388);
};