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
@leoken
leoken / main.js
Created October 16, 2012 01:56
DOM-based routing based on WordPress body_class()
// http://paulirish.com/2009/markup-based-unobtrusive-comprehensive-dom-ready-execution/
// Modified to only fire on body class (not body class + ID, working off strictly WordPress body_class)
Roots = {
// all pages
common: {
init: function(){
// $('a').click(function() {
// alert('Hello world!');
@leoken
leoken / alerts.less
Created October 14, 2012 23:42
Bootstrap v2.1.1 + Gravity Forms
//
// Alerts
// --------------------------------------------------
// Base styles
// -------------------------
.alert,
.validation_error,
@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
@leoken
leoken / gist:3350167
Created August 14, 2012 15:12
CSS property order #1
.topbar {
position: fixed;
top: 0;
right: 0;
left: 0;
height: 40px;
padding: 0 20px;
background-color: #333;
border-bottom: 1px solid rgba(0,0,0,.1);
box-shadow: 0 2px 3px rgba(0,0,0,.5);
####################################
# BASIC REQUIREMENTS
# http://graphite.wikidot.com/installation
# http://geek.michaelgrace.org/2011/09/how-to-install-graphite-on-ubuntu/
# Last tested & updated 10/13/2011
####################################
sudo apt-get update
sudo apt-get upgrade
@leoken
leoken / gist:2767613
Created May 22, 2012 08:33 — forked from rxgx/code-server.md
Cloud Server Security Checklist for Ubuntu 11.10

###Getting Started

Login as root. If you don't specify root, you'll use the current user on your machine.

ssh root@12.34.56.78

Change root password.

passwd
<%= stylesheet_link_tag 'mobile/jquery.mobile-1.0.1.min', 'mobile/mobile' %>
<%= javascript_include_tag 'mobile/respond.min' %>
<%= javascript_include_tag 'mobile/jquery', 'mobile/jquery_ujs', "https://js.stripe.com/v1/", 'orders' %>
<%= javascript_include_tag 'mobile/jquery.mobile-1.0.1.min' %>
<%= csrf_meta_tag %>
<%= tag :meta, :name => "stripe-key", :content => STRIPE_PUBLIC_KEY %>
@leoken
leoken / gist:2317984
Created April 6, 2012 07:47 — forked from boucher/gist:1750375
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");
@leoken
leoken / gist:2317981
Created April 6, 2012 07:46 — forked from boucher/gist:1750368
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 / gist:2049576
Created March 16, 2012 10:54 — forked from luetkemj/wp-query-ref.php
WordPress WP Query $args
<?php
/**
* WordPress Query Comprehensive Reference
* Compiled by luetkemj - luetkemj.com
*
* CODEX: http://codex.wordpress.org/Class_Reference/WP_Query
* Source: http://core.trac.wordpress.org/browser/tags/3.3.1/wp-includes/query.php
*/
$args = array(