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
// Wrap a function and return a promise instead of accepting a callback. | |
// | |
// @param target [Function] the function to be wrapped. This function *must* | |
// accept a callback as its last argument of the form `function(err, data) {}`. | |
// @param args [Array] an array of the arguments for the target function. | |
// Not including the final callback, which will be provided by promisify. | |
// @return [Promise] A jQuery promise object which will resolve or reject | |
// based on the arguments passed to the callback. | |
function promisify(fun, args, self) { | |
var d = $.Deferred(); |
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
<script> | |
analytics.track('Order Completed', { | |
order_id: '<%= j order.number %>', | |
affiliation: '<%= current_store.name %>', | |
total: '<%= order.total %>', | |
shipping: '<%= order.ship_total %>', | |
tax: '<%= order.tax_total %>', | |
discount: '<%= (- order.promo_total) %>', | |
coupon: '<%= order.coupon_code %>', | |
currency: '<%= order.currency %>', |
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
# A script to help setup S3 for new projects using aws sdk | |
# | |
# - Create new S3 bucket <prompt for bucket name> | |
# - [optional] configure bucket as website | |
# - [optional] configure bucket as publicly readable | |
# - Create new IAM user <prompt for user name> | |
# - Create new customer managed policy for full S3 access to new bucket only | |
# - Attach policy directly to new user | |
# - Create and print API access keypair | |
# |
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
### Keybase proof | |
I hereby claim: | |
* I am sinetheta on github. | |
* I am sinetheta (https://keybase.io/sinetheta) on keybase. | |
* I have a public key ASBB3vf88ZLQjHDf7HO4FwtmvxTXWghhzjn-1EK2q58YHAo | |
To claim this, I am signing this object: |
OlderNewer