Skip to content

Instantly share code, notes, and snippets.

View stevewaffles's full-sized avatar

stevewaffles

View GitHub Profile
#import <UIKit/UIKit.h>
#import <ImageIO/ImageIO.h>
#import <MobileCoreServices/MobileCoreServices.h>
static UIImage *frameImage(CGSize size, CGFloat radians) {
UIGraphicsBeginImageContextWithOptions(size, YES, 1); {
[[UIColor whiteColor] setFill];
UIRectFill(CGRectInfinite);
CGContextRef gc = UIGraphicsGetCurrentContext();
CGContextTranslateCTM(gc, size.width / 2, size.height / 2);
// Long Polling (Recommened Technique - Creates An Open Connection To Server ∴ Fast)
(function poll(){
$.ajax({ url: "server", success: function(data){
//Update your dashboard gauge
salesGauge.setValue(data.value);
}, dataType: "json", complete: poll, timeout: 30000 });
})();
@stevewaffles
stevewaffles / charge.php
Created April 13, 2014 20:14
Stripe test app
<pre>
<?php
print_r($_POST);
?>
</pre>
<p>
<a href="/">Start over</a>
</p>
@stevewaffles
stevewaffles / index.php
Last active August 29, 2015 13:58
Stripe test app
<?php
require_once('./stripe-php/lib/Stripe.php');
$stripe = array(
"secret_key" => "YOUR_SECRET_KEY",
"publishable_key" => "YOUR_PUBLIC_KEY"
);
Stripe::setApiKey($stripe['secret_key']);
?>