Skip to content

Instantly share code, notes, and snippets.

@okor
okor / gist:79c38cfb03b153bd4eb2
Created February 9, 2015 04:35
Install Thumbor on Ubuntu 14.04
# sudo su and run the following
sudo apt-get update && \
sudo apt-get -y upgrade && \
# install all dependencies
sudo apt-get -y install \
build-essential \
checkinstall \
gcc \
@ericelliott
ericelliott / essential-javascript-links.md
Last active November 8, 2024 17:29
Essential JavaScript Links
@viezel
viezel / app.js
Last active June 15, 2020 19:13
Codebird for Appcelerator Titanium. Using the Twitter API 1.1
// This is an example of use.
// Here we use the new Bearer Token thats make it possible to get tweets without user login
// More info on Bearer here: https://dev.twitter.com/docs/auth/application-only-auth
// Full Codebird API is here: https://github.com/mynetx/codebird-js
var Codebird = require("codebird");
var cb = new Codebird();
cb.setConsumerKey('CONSUMER_KEY', 'CONSUMER_SECRET_KEY');
var bearerToken = Ti.App.Properties.getString('TwitterBearerToken', null);
@rampicos
rampicos / social.js
Last active January 10, 2019 10:10
Social.js is the Appcelerator Titanium's Alloy Widget at first it is used to connect with Twitter only, though twitter and linkedin uses OAuth for its authentication I made some changes on Social.js for multi-purpose to connect Twitter and LinkedIn
function hex_sha1(s) {
return binb2hex(core_sha1(str2binb(s), s.length * chrsz));
}
function b64_sha1(s) {
return binb2b64(core_sha1(str2binb(s), s.length * chrsz));
}
function str_sha1(s) {
return binb2str(core_sha1(str2binb(s), s.length * chrsz));
@joslynesser
joslynesser / oauth_10a_curl.sh
Created April 10, 2012 15:39
OAuth 1.0a Curl Request
# Replace oauth_consumer_key with your consumer key
# Replace oauth_token with your access token
# Replace oauth_signature with "your_consumer_secret%26your_access_token_secret"
# Note that the oauth_nonce must change and be unique for every request
curl -X GET 'https://yoursite.desk.com/api/v1/account/verify_credentials.json' -H 'Authorization: OAuth oauth_version="1.0",oauth_timestamp=1321473112,oauth_nonce=937459123,oauth_signature_method="PLAINTEXT",oauth_consumer_key="nMu4u9pLRfDrxhPVK5yn",oauth_token="ivouGxpsJbyIU5viPKOO",oauth_signature="vLr9MjzowzVwbvREpWhIVQMJQI0G7Pin6KHCoXak%26igQY0L2bcbwonZTC4kG5ulZxTMTDW0K0zIyceSuF"'