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
;; very simple example on how to use Animated with reagent | |
;; https://facebook.github.io/react-native/docs/animations.html | |
(def animated (.-Animated js/React)) | |
(def animated-value (.-Value animated)) | |
(def animated-view (r/adapt-react-class (.-View animated))) | |
(defn bounce [] | |
(let [bounce-value (new animated-value 0)] | |
(.setValue bounce-value 1.5) |
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
require "hmac" | |
require "hmac-sha2" | |
# reference: | |
# http://docs.amazonwebservices.com/AWSECommerceService/2009-07-01/DG/index.html?BasicAuthProcess.html | |
# http://docs.amazonwebservices.com/AWSECommerceService/2009-07-01/DG/index.html?Query_QueryAuth.html | |
module AmazonSignature | |
def sign_request(params) | |
params.reverse_merge!(:Timestamp => timestamp, :Version => "2009-07-01") | |
params.merge!(:Signature => build_signature(params, "GET")) |