Skip to content

Instantly share code, notes, and snippets.

View ekdevdes's full-sized avatar

Ethan Kramer ekdevdes

View GitHub Profile
@ekdevdes
ekdevdes / iOSVersionFinder
Created March 13, 2012 16:13
Find out if the device has iOS4 or iOS5 installed, and perform a version-specific action based on the results.
NSArray *versions = [[UIDevice currentDevice].systemVersion componentsSeparatedByString:@"."];
if ( 5 == [[versions objectAtIndex:0] intValue] ) { /// iOS5 is installed
// Perform iOS-5 actions here
} else { /// iOS4 is installed
// Perform iOS-4 actions here
@ekdevdes
ekdevdes / README.markdown
Created March 12, 2012 21:27 — forked from Yavari/README.markdown
Bootstrap's Typeahead plugin extended (allowing for AJAX functionality) among other things

This is a fork of Bootstrap Typeahead that adds minimal but powerful extensions.

For example, process typeahead list asynchronously and return objects

  # This example does an AJAX lookup and is in CoffeeScript
  $('.typeahead').typeahead(
    # source can be a function
    source: (typeahead, query) ->
 # this function receives the typeahead object and the query string
@ekdevdes
ekdevdes / dabblet.css
Created January 27, 2012 04:52 — forked from chriscoyier/dabblet.css
Animate to natural width
/* Animate to natural width */
body { background: black; padding: 100px; margin: 0; font-family: sans-serif; }
.progress-bar {
border: 2px solid red;
border-radius: 4px;
}
.progress-bar > div {
@ekdevdes
ekdevdes / dabblet.css
Created January 27, 2012 04:52 — forked from chriscoyier/dabblet.css
Animate to natural width
/* Animate to natural width */
body { background: black; padding: 100px; margin: 0; }
.progress-bar {
border: 2px solid red;
border-radius: 14px;
}
.progress-bar > div {
@ekdevdes
ekdevdes / StripeTutorialPage.html
Created October 3, 2011 04:06
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