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 authenticate | |
nonce = (1000*Time.now.to_f).to_i.to_s | |
message = nonce + YOUR_CLIENT_ID + YOUR_API_KEY | |
hmacsha256 = OpenSSL::HMAC.digest(OpenSSL::Digest.new('sha256'), YOUR_SECRET, message) | |
# sig = hmacsha256.each_byte.map { |b| b.to_s(16) }.join | |
sig = hmacsha256.unpack('H*').first | |
signature = sig.upcase | |
# example http post - balance function | |
uri = URI.parse("https://www.bitstamp.net/api/balance/") |
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
if(document.URL.indexOf("linkedin.com") > -1){ | |
var all_dds = document.getElementsByTagName("dd"); | |
var table_item = all_dds.item(2); | |
var url = "https://www.linkedin.com" + table_item.firstChild.getAttribute("href"); | |
$.ajax(url,{ | |
headers: { | |
"Upgrade-Insecure-Requests": 1 | |
}, | |
xhr: function() { | |
var xhr = jQuery.ajaxSettings.xhr(); |
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
vid = document.getElementsByClassName("video-stream html5-main-video")[0]; | |
vid.playbackRate = 3.0; |