This file contains 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
<div id="info-content"> | |
<div id="info-bubble"> | |
<%= auto_link(simple_format(@event.info)) %> | |
</div> | |
</div> |
This file contains 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
<script> | |
var intercomSettings = { | |
app_id: '4f13azhy', | |
email: 'user_email', | |
created_at: unixtimestamp_of_when_user_signed_up | |
}; | |
(function() { | |
function async_load() { | |
var s = document.createElement('script'); | |
s.type = 'text/javascript'; s.async = true; |
This file contains 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
- (void)applicationDidEnterBackground:(UIApplication *)application | |
{ | |
// Date Formatter to dd/MM/yyyy | |
NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init]; | |
[dateFormatter setDateFormat:@"dd/MM/yy"]; | |
NSDateFormatter *dateFormatterWithTime = [[NSDateFormatter alloc] init]; | |
[dateFormatterWithTime setDateFormat:@"dd/MM/yy HH:mm"]; | |
// Instantiate some dates, fool. |
This file contains 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
// Don't forget to include Twitter/Twitter.h into your implementation for this to work! | |
// Both amountSavedString and numDaysString are simple strings containing... well what they say. | |
NSString *tweet = [NSString stringWithFormat:@"I've saved %@ by not smoking for %@ with @getkickit", amountSavedString, numDaysString]; | |
TWTweetComposeViewController *twitter = [[TWTweetComposeViewController alloc] init]; | |
[twitter setInitialText:tweet]; | |
if([TWTweetComposeViewController canSendTweet]) |
This file contains 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
def results | |
@venues = Hashie::Mash.new(client.search_venues(:ll => coords, :query => @venue)) | |
# Checking the imagery | |
@venues.groups.first.items.each do |check| | |
@threads = [] | |
@threads << image_check(check.id) | |
end | |
end | |
# Working progress. |
This file contains 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
# | |
# Short example on threaded API calls | |
# | |
# This code snippet is from spots.io and how it threads API calls to lookup whether a foursqaure location has | |
# Instagram photos or not. | |
# | |
# Create an sexual empty array | |
location_threads = [] |
This file contains 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
#!/usr/bin/env sh | |
## | |
# This is script with usefull tips taken from: | |
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
# | |
# install it: | |
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh | |
# |
This file contains 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
# CRO API Access by @bkenny | |
# | |
# Example, to search for a company use: CRO.new(email_address, api_key).companies("Starbucks") | |
# To search for a companies submissions: CRO.new(email_address, api_key).submissions("315499", "c") | |
require 'rubygems' | |
require 'httparty' | |
require 'hashie' | |
class CRO |
This file contains 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 'rubygems' | |
require 'mongo' | |
require 'net/http' | |
require 'active_support/core_ext' | |
require 'crack' | |
require 'uri' | |
require 'hashie' | |
def convert(feed) | |
db = Mongo::Connection.new.db("blogs") |
This file contains 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 'json' | |
require 'httparty' | |
require 'geocoder' | |
require 'foursquare2' | |
require 'hashie' | |
@@client = Foursquare2::Client.new(:client_id => 'PQPTTYWDIXOYHUYJMO0UX30W1VI0Q3IHXC314QSA50VMZDNB', :client_secret => 'AIUV3COEJRQOMDUQXEFXN0X5LPRSEP1P43TLNMN00RQ30U4H') | |
def show_subcategories |