Skip to content

Instantly share code, notes, and snippets.

View ekdevdes's full-sized avatar

Ethan Kramer ekdevdes

View GitHub Profile
@ekdevdes
ekdevdes / vjCSk.js
Created June 28, 2012 04:57
[JS] iCal-like event adder (posted via Fiddles for iOS)
$('div').hide();
$('a').toggle(function(){
$(this).find('span').addClass("rotate");
$('div').fadeIn(300);
},function(){
@ekdevdes
ekdevdes / RDzhA.css
Created June 28, 2012 04:57
[CSS] fiddles html for email (posted via Fiddles for iOS)
html,body{
font-family:sans-serif;
}
b{
font-weight:bold;
}
dt,dd{
display:inline;
}
@ekdevdes
ekdevdes / RDzhA.html
Created June 28, 2012 04:57
[HTML] fiddles html for email (posted via Fiddles for iOS)
<a href="http://jsfiddle.net/ethankr/xyz/123"><h1 style='display:inline;'>iCal-like dates</h1><h3 style='display:inline;'> v3</h3></a>
<p>use in maranatha's site and use sugar js with it</p>
<dl>
<dt><b>Framework</b></dt>
<dd>jQuery</dd>
<br>
<dt><b>Normalize CSS?</b></dt>
<dd>No</dd>
<br>
<dt><b>Slug</b></dt>
@ekdevdes
ekdevdes / Fancy File Inputs.js
Created June 19, 2012 02:43 — forked from davist11/Fancy File Inputs.js
Fancy File Inputs
var SITE = SITE || {};
SITE.fileInputs = function() {
var $this = $(this),
$val = $this.val(),
valArray = $val.split('\\'),
newVal = valArray[valArray.length-1],
$button = $this.siblings('.button'),
$fakeFile = $this.siblings('.file-holder');
if(newVal !== '') {
@ekdevdes
ekdevdes / AExmK.html
Created June 15, 2012 20:37
[HTML] query test (posted via Fiddles for iOS)
<a href="http://jsfiddle.net/api/user/zalun/demo/list.json?sort=framework&limit=20&start=21">NSString <code>query</code> test</a>
@ekdevdes
ekdevdes / AExmK.html
Created June 12, 2012 20:35
[HTML] query test (posted via Fiddles for iOS)
<a href="http://jsfiddle.net/api/user/zalun/demo/list.json?sort=framework&limit=20&start=21">NSString <code>query</code> test</a>
@ekdevdes
ekdevdes / AExmK.html
Created June 8, 2012 20:28
[HTML] query test (posted via Fiddles for iOS)
<a href="http://jsfiddle.net/api/user/zalun/demo/list.json?sort=framework&limit=20&start=21">NSString <code>query</code> test</a>
@ekdevdes
ekdevdes / jasmine-ajax-example-spec.coffee
Created April 23, 2012 19:56 — forked from searls/jasmine-ajax-example-spec.coffee
A simple Jasmine Ajax spying example
window.context = window.describe
describe ".googlePandaStatus", ->
Given -> @ajaxCaptor = jasmine.captor()
Given -> spyOn($, "get")
When -> googlePandaStatus("Happy")
And -> expect($.get).toHaveBeenCalledWith("http://google.com", @ajaxCaptor.capture())
describe "~ the AJAX success handler", ->
Given -> spyOn(window, "printMessage")
@ekdevdes
ekdevdes / humanize.rb
Last active December 18, 2020 16:46
Ruby: Humanize a string (the first "real" ruby method I've ever written. It was approximately 2 years ago)
# words must be seperated by an underscore
# ex. "hello_there-pal" isnt valid but "hello_there_pal" is
# humanize "hello_there" # => "Hello There"
# humanize "hello there" # => "Hello There"
# humanize "hello_there", {format: :class,without: :dashes, separator: :space}
# options
# format:
# :class -> change a string like "hello string" to "HelloString"
# :sentence -> change a string like "hello_String" to "Hello string"
@ekdevdes
ekdevdes / source.coffee
Created April 17, 2012 12:43
CoffeeScript: Simple jQuery Plugin Template
( ($) ->
$.fn.pluginName (options) ->
return @.each( ->
);
)(jQuery);​