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
public class TwitterVideoApiClient extends TwitterApiClient{ | |
private static final String TWITTER_UPLOAD_URL = "https://upload.twitter.com"; | |
private RestAdapter twitterVideoApiClientAdapter; | |
public TwitterVideoApiClient(TwitterSession session) { |
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
@ParseClass | |
Public class AuthToken { | |
String token; | |
String provider; | |
} | |
//put this part after u get the linkedin token. |
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
try: | |
r.table('marketplaces').insert( | |
r.http('https://raw.githubusercontent.com/sirvon/fourthScreen/master/marketplaces_only_RETHINKDB.json', result_format='json').merge(lambda marketplace: | |
{"location": r.point( | |
marketplace["location"][0], | |
marketplace["location"][1]) | |
} | |
) | |
).run(conn) | |
except Exception as e: |
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
Install s3fs on Mac OS X | |
1 - Install Homebrew - http://brew.sh/ | |
ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)" | |
2 - Use Homebrew to install s3fs + dependencies | |
brew install s3fs | |
3 - Do some custom stuff. I only used the first step from here -> https://gist.github.com/fukayatsu/3910097 | |
sudo /bin/cp -rfX /usr/local/Cellar/fuse4x-kext/0.9.2/Library/Extensions/fuse4x.kext /Library/Extensions |
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
import requests | |
import json | |
import base64 | |
import pprint | |
import unittest | |
import time | |
import datetime | |
# Put this in contactMechList | |
ADDRESS_TEMPLATE = { |
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
let view:String.UTF8View = string.utf8 | |
if let from = range.lowerBound.samePosition(in: view), | |
let to = range.upperBound.samePosition(in: view) { | |
offset.pointee += Int32(string[string.startIndex..<range.lowerBound].utf8.count) | |
length.pointee = Int32(view.distance(from: from, to: to)) | |
return token | |
} else { | |
return nil | |
} |
OlderNewer