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
#!/bin/bash | |
### Command log to install Cuda Toolkit 6.5, driver 343.22, and ccminer. | |
## Update the system | |
sudo apt-get update && sudo apt-get -y dist-upgrade | |
# All the dependencies for Cuda & ccminer (I think) | |
sudo apt-get -y install gcc g++ build-essential automake linux-headers-$(uname -r) git gawk libcurl4-openssl-dev libjansson-dev xorg libc++-dev libgmp-dev python-dev | |
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
function beginApplePay() { | |
var paymentRequest = {"countryCode":"SG","currencyCode":"SGD","requiredBillingContactFields":["postalAddress,","email","name","phone"],"requiredShippingContactFields":["postalAddress,","email","name","phone"],"total":{"label":"THE FIFTH COLLECTION","amount":"70.00"},"lineItems":[{"label":"Subtotal","type":"final","amount":"70.00"},{"label":"Free Delivery","type":"final","amount":"0.00"}],"billingContact":{"emailAddress":"[email protected]","familyName":"Donaghy","givenName":"Jack","addressLines":["30 Rockefeller Plaza"],"locality":"New York","administrativeArea":null,"postalCode":"10112","country":"Singapore","countryCode":"SG"},"shippingContact":{"familyName":"Donaghy","givenName":"Jack","addressLines":["30 Rockefeller Plaza"],"locality":"New York","administrativeArea":null,"postalCode":"10112","country":"Singapore","countryCode":"SG"}}; | |
var session = Stripe.applePay.buildSession(paymentRequest, | |
function(result, completion) { | |
console.log(result); | |
$.post('/checkou |
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
<script> | |
/* Grab the captured email from successful OptinMonster form, and push into cartstack */ | |
jQuery(document).ready( function($){ | |
$(document).on('OptinMonsterOptinSuccess', function( event, data, object ){ | |
_cartstack.push(['setEmail',object.public.optin_data.email]) | |
}); | |
}); | |
</script> |
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
def notify_cartstack | |
require 'httpclient' | |
key = ENV["CARTSTACK_KEY"] | |
siteid = ENV["CARTSTACK_SITEID"] | |
url = URI.parse("https://api.cartstack.com/ss/v1/?key=#{key}&siteid=#{siteid}&email=#{email}&total=#{total}") | |
client = HTTPClient.new | |
res = client.request 'GET', url | |
body = JSON.parse(res.body) | |
resp_code = body["resp"] | |
if resp_code && resp_code == "100" |