This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"stream": | |
{ | |
"id": #id, | |
"createdAt": #dateTime, | |
"url": #url, | |
"event_type": "stream_created" | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
new L.mapbox.geocoderControl('mapbox.places', { | |
position: 'topleft' | |
autocomplete: true | |
keepOpen: true | |
queryOptions: | |
country: 'us' | |
}).addTo(@map) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
statements: [ | |
{ property: 'city', operation: '=', value: 'Costa Mesa, Newport Beach' }, | |
{ property: 'status', operation: '=', value: 'Active', func: 'and' }, | |
{ property: 'min_beds', operation: '=', value: 3, func: 'and' }, | |
{ property: 'max_beds', operation: '=', value: 4, func: 'and' }, | |
{ property: 'min_baths_search', operation: '=', value: 2, func: 'and' }, | |
{ property: 'max_baths_search', operation: '=', value: 3, func: 'and' }, | |
{ property: 'min_price_list', operation: '=', value: 800000, func: 'and' }, | |
{ property: 'max_price_list', operation: '=', value: 900000, func: 'and' }, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'beaneater' | |
require 'JSON' | |
class SimpleBenchmarker | |
def run(&block) | |
start_time = Time.now | |
block.call | |
end_time = Time.now | |
elapsed = end_time - start_time | |
p "Elapsed Time: #{elapsed} seconds" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//NSString *string = [NSString stringWithFormat:@"%@weather.php?format=json", BaseURLString]; | |
NSString *string = [NSString stringWithFormat:@"%@sessions", BaseURLString]; | |
NSURL *url = [NSURL URLWithString:string]; | |
NSURLRequest *request = [NSURLRequest requestWithURL:url]; | |
// 2 | |
NSDictionary *params = @{@"email": email, | |
@"password": password}; | |
AFHTTPRequestOperation *operation = [[AFHTTPRequestOperation alloc] initWithRequest:request]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1.upto(100).each do |i| | |
if (i%3==0 && i%5==0) | |
p "FizzBuzz" | |
elsif i%3==0 | |
p "Fizz" | |
elsif i%5==0 | |
p "Buzz" | |
else | |
p i | |
end |