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 'mail' | |
load 'mrbananagrabber.rb' | |
module Mail | |
def self.to_hash | |
puts "ok" | |
end | |
end | |
x = Mail.new STDIN.read |
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
function log_me(data){ | |
console.log(data); | |
} | |
jQuery.ajax({url: "http://api.tumblr.com/v2/blog/scipsy.tumblr.com/info?api_key={YOUR-KEY}&jsonp=log_me", dataType: "jsonp"}); |
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 python | |
import oauth2 as oauth | |
import urlparse | |
import urllib | |
consumer_key = '<your-key-here>' | |
consumer_secret = '<your-secret-key-here>' | |
request_token_url = 'http://www.tumblr.com/oauth/request_token' |
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 python | |
import urllib | |
import urlparse | |
import oauth2 as oauth | |
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
import urllib,hmac,time,hashlib,base64,httplib,sys,json,urlparse | |
## This is just a simple example that is self contained. | |
## You will need to modified it to make it work | |
## | |
## creds - need to be filled out | |
## blognmae - needs to be defined | |
## | |
## reads in image files from the command line and posts to your blog | |
## |
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 'net/http'; require 'json'; JSON.parse(Net::HTTP.get(URI("http://duckduckgo.com/?q=#{query}&o=json"))) |
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
<?php | |
#Requires PHP 5.3.0 | |
define("CONSUMER_KEY", "consumer_key"); | |
define("CONSUMER_SECRET", "consumer_secret"); | |
define("OAUTH_TOKEN", "access_token"); | |
define("OAUTH_SECRET", "access_secret"); | |
function oauth_gen($method, $url, $iparams, &$headers) { |
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 python | |
import oauth2 as oauth | |
consumer = oauth.Consumer('consumer_key','consumer_secret') | |
token = oauth.Token('oauth_key', 'oauth_secret') | |
client = oauth.Client(consumer, token) | |
print client.request("http://api.tumblr.com/v2/user/info", "POST") |
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
import urlparse | |
import oauth2 as oauth | |
consumer_key = 'consumer_key' | |
consumer_secret = 'consumer_secret' | |
request_token_url = 'http://www.tumblr.com/oauth/request_token' | |
access_token_url = 'http://www.tumblr.com/oauth/access_token' | |
authorize_url = 'http://www.tumblr.com/oauth/authorize' |
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
function multiply(a,b) { | |
return a * b; | |
} | |
data = [1,2,3]; | |
for(var d in data) { | |
answer = multiply(data[d], 2); | |
console.log(answer); | |
} |
OlderNewer