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
@defunkt
defunkt / installing-Mustache.tmbundle.md
Created March 6, 2010 10:27
Installing Mustache.tmbundle
@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 / complete wordpress backup from shell.sh
Created October 13, 2012 06:06
complete wordpress backup from shell
#!/bin/bash
# This script creates a compressed backup archive of the given directory and the given MySQL table. More details on implementation here: http://theme.fm
# Feel free to use this script wherever you want, however you want. We produce open source, GPLv2 licensed stuff.
# Author: Konstantin Kovshenin exclusively for Theme.fm in June, 2011
# Set the date format, filename and the directories where your backup files will be placed and which directory will be archived.
NOW=$(date +"%Y-%m-%d-%H%M")
FILE="example.org.$NOW.tar"
BACKUP_DIR="/home/username/backups"
@leoken
leoken / css-ribbon-triangles.html
Created December 8, 2012 07:27
A CodePen by Erik James Albaugh. CSS Ribbon Triangles - Top, bottom, left, and right triangles for a ribbon-like effect using only CSS.
<div class="container">
<h1 class="bltri"><span>⬋</span> Bottom Left Ribbon Triangle</h1>
<h1 class="brtri"><span>⬊</span> Bottom Right Ribbon Triangle</h1>
<h1 class="tltri"><span>⬉</span> Top Left Ribbon Triangle</h1>
<h1 class="trtri"><span>⬈</span> Top Right Ribbon Triangle</h1>
</div>
@leoken
leoken / wordpress-htaccess-rackspace-sites
Created December 1, 2012 04:33 — forked from rachelbaker/wordpress-htaccess-rackspace-sites
Rackspace Cloud .htaccess file fixes for WordPress
# PHP Site Settings for Rackspace Cloud Sites
php_value max_execution_time 3600
php_value upload_max_filesize 100M
php_value post_max_size 220M
php_value memory_limit 256M
# End PHP Site Settings
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
@leoken
leoken / alerts.less
Created October 14, 2012 23:42
Bootstrap v2.1.1 + Gravity Forms
//
// Alerts
// --------------------------------------------------
// Base styles
// -------------------------
.alert,
.validation_error,
@leoken
leoken / index.html
Created October 5, 2012 08:32
A pure CSS3 fancy text banner using transforms, pseudo-elements, last-child, and more!
<div class="banner">
<div class="line">
<span>Fancy Banners</span>
</div>
<div class="line">
<span>Make It Look</span>
</div>
<div class="line">
<span>Nice &amp; Classy</span>
</div>
@leoken
leoken / StripeTutorialPage.html
Created September 22, 2012 04:33 — forked from boucher/StripeTutorialPage.html
Stripe Tutorial Payment Form
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<title>Stripe Getting Started Form</title>
<script type="text/javascript" src="https://js.stripe.com/v1/"></script>
<!-- jQuery is used only for this example; it isn't required to use Stripe -->
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
<script type="text/javascript">
// this identifies your website in the createToken call below