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
| Stripe.api_key = # your API key | |
| nextCharges = Stripe::Charge.all(:limit => 100) | |
| data = nextCharges.data | |
| while nextCharges.has_more do | |
| nextCharges = Stripe::Charge.all(:limit => 100, :starting_after => data[data.length - 1].id) | |
| data = data + nextCharges.data | |
| end | |
| data.inject(0) {| sum, nextCharge | sum + nextCharge.amount } |
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
| // | |
| // ViewController.swift | |
| // testingstripe | |
| // | |
| // Created by Charles Francis on 5/22/15. | |
| // Copyright (c) 2015 Charles Francis. All rights reserved. | |
| import UIKit | |
| class ViewController: UIViewController, PKPaymentAuthorizationViewControllerDelegate { |
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
| func paymentAuthorizationViewController( | |
| controller: PKPaymentAuthorizationViewController, | |
| didAuthorizePayment payment: PKPayment, | |
| completion: ((PKPaymentAuthorizationStatus) -> Void)) { | |
| self.handlePaymentAuthorizationWithPayment(payment, completion:completion); | |
| } | |
| func handlePaymentAuthorizationWithPayment(payment: PKPayment, completion: ((PKPaymentAuthorizationStatus) -> Void)!) { | |
| STPAPIClient.sharedClient().createTokenWithPayment( |
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 | |
| ### steps #### | |
| # verify the system has a cuda-capable gpu | |
| # download and install the nvidia cuda toolkit and cudnn | |
| # setup environmental variables | |
| # verify the installation | |
| ### | |
| ### to verify your gpu is cuda enable check |
OlderNewer