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
var USERS = 'holahalo_users' | |
var USERTOKENS = 'holahalo_user_tokens' | |
var USEREMAILS = 'holahalo_user_emails' | |
var db = require('riak-js').getClient() | |
var _ = require('underscore') | |
var async = require('async') | |
var USERS = 'holahalo_users' | |
var USERTOKENS = 'holahalo_user_tokens' |
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
int main(int argc, char *argv[]) | |
{ | |
QCoreApplication a(argc, argv); | |
QString consumerKey("W3f50lSJiI00CDVg6UwhxQ"); | |
QString consumerSecret("CHPWgrNu1wanwvSXax3b7FQarXBgVeZXUFysD4yZKXg"); | |
OAuth * o = new OAuth( | |
consumerKey, | |
consumerSecret, |
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
{ moderatorRefreshToken: 'wu7LJ1iUoUssNfqSb3xIjPACJNJNeZni', | |
moderatorAccessToken: 'Asyfpn0PxiSm7pSti9LeLyfWgVfdQ7Dm', | |
posterRefreshToken: 'LaLS63Q7bGemttzqJFSQqnrvEgkb9Kk2', | |
posterAccessToken: 'WlwE53pshDMf8lZBXHAPIma0iBFzSNzz' } |
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
// from http://qt-project.org/wiki/HMAC-SHA1 | |
QString hmacSha1(QByteArray key, QByteArray baseString) | |
{ | |
int blockSize = 64; // HMAC-SHA-1 block size, defined in SHA-1 standard | |
if (key.length() > blockSize) { // if key is longer than block size (64), reduce key length with SHA-1 compression | |
key = QCryptographicHash::hash(key, QCryptographicHash::Sha1); | |
} | |
QByteArray innerPadding(blockSize, char(0x36)); // initialize inner padding with char "6" |
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
'https://m.facebook.com/login.php?m=m&next=https%3A%2F%2Fwww.facebook.com%2Fdialog%2Fpermissions.request%3F_path%3Dpermissions.request%26app_id%3D399722263402550%26redirect_uri%3Dhttps%253A%252F%252Fwww.facebook.com%252Fconnect%252Flogin_success.html%26display%3Dtouch%26response_type%3Dtoken%26perms%3Dpublish_stream%26fbconnect%3D1%26from_login%3D1%26client_id%3D399722263402550&refsrc=http%3A%2F%2Fm.facebook.com%2Flogin.php&refid=9' |
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
void myclass::paintEvent(QPaintEvent *pe) { | |
QStyleOption o; | |
o.initFrom(this); | |
QPainter p(this); | |
style()->drawPrimitive(QStyle::PE_Widget, &o, &p, this); | |
}; |
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
var spawn = require('child_process').spawn, | |
// arguments -> type username password (scope) | |
/* | |
types ={ | |
gplus : 0 | |
facebook : 1 | |
twitter : 2 | |
} | |
facebook -> spawn('./sns', ['1', '[email protected]', 'dio10201', 'email, publish_stream']) |
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
var page = require('webpage').create() | |
page.settings.userAgent = 'Mozilla/5.0 (X11; Linux i686; rv:10.0) Gecko/20100101 Firefox/10.0'; | |
var address = 'https://www.facebook.com/dialog/oauth?client_id=399722263402550&redirect_uri=https://www.facebook.com/connect/login_success.html&type=user_agent&display=touch&scope=email' | |
page.open(address, function(status){ | |
if(status == 'success'){ | |
var res = page.evaluate(function(){ function login(username, password){ if('continue' == 'break') return JSON.stringify(obj); document.querySelector('input[name=email]').value=username; document.querySelector('input[name=pass]').value=password; document.querySelector('input[name=login]').click();}; var obj = {'message':'success','stage':'aegislabs_facebook_login_page'}; var location = window.location.toString(); obj.location = location; var title = document.title; obj.title = title; var errorDiv = document.querySelector('div.abb.acr.aps');var mailField = document.querySelector('input[name=email]'); var passField = document.que |
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
var page = require('webpage').create() | |
var system = require('system') | |
var clientId = '399722263402550' | |
var address = "https://www.facebook.com/dialog/oauth?client_id={0}&redirect_uri=https://www.facebook.com/connect/login_success.html&type=user_agent&display=touch&scope={1}" | |
address = address.split('{0}').join(clientId).split('{1}').join(system.args[3]) | |
page.settings.userAgent = 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/536.6 (KHTML, like Gecko) Chrome/20.0.1092.0 Safari/536.6'; |
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
var _ = require('lodash') | |
var request = require('request') | |
var async = require('async') | |
var db = require('./config/connection') | |
var QUERY_TOKENS = "SELECT token_fb, token_twitter, token_secret_twitter, token_gplus FROM sns_hub_users WHERE token_sns = ? " | |
function timeline(params, cb){ | |
function facebook(token, callback){ |