Skip to content

Instantly share code, notes, and snippets.

View leoken's full-sized avatar

Erik James Albaugh leoken

  • Maintain Web
  • Long Beach, CA
  • X @leoken
View GitHub Profile
@boucher
boucher / gist:1750375
Created February 6, 2012 07:09 — forked from siddarth/gist:1379745
Stripe PHP simple example
<?php
require 'path-to-Stripe.php';
if ($_POST) {
Stripe::setApiKey("YOUR-API-KEY");
$error = '';
$success = '';
try {
if (!isset($_POST['stripeToken']))
throw new Exception("The Stripe Token was not generated correctly");
@boucher
boucher / gist:1750368
Created February 6, 2012 07:07 — forked from saikat/gist:1084146
Stripe sample checkout form
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<title>Stripe Sample Form</title>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
<script type="text/javascript" src="https://ajax.aspnetcdn.com/ajax/jquery.validate/1.8.1/jquery.validate.min.js"></script>
<script type="text/javascript" src="https://js.stripe.com/v1/"></script>
<script type="text/javascript">
@leoken
leoken / db.php
Created September 23, 2011 22:40 — forked from rahims/db.php
Code for a basic SMS voting system. Full write-up here: http://www.twilio.com/blog/2011/05/how-to-create-a-simple-sms-voting-system-using-php.html
<?php
class DB {
const DB_NAME = 'votes.sqlite';
protected $db;
function __construct() {
$this->db = new PDO('sqlite:'.self::DB_NAME);
}
@leoken
leoken / wp-users-menu
Created September 16, 2011 21:34
WP Different Menus for Logged In or Logged Out Users
<?php
if ( is_user_logged_in() ) {
wp_nav_menu( array( 'theme_location' => 'logged-in-menu' ) );
} else {
wp_nav_menu( array( 'theme_location' => 'logged-out-menu' ) );
}
?>
@defunkt
defunkt / installing-Mustache.tmbundle.md
Created March 6, 2010 10:27
Installing Mustache.tmbundle