Skip to content

Instantly share code, notes, and snippets.

View eculver's full-sized avatar
🧠
Braining

Evan Culver eculver

🧠
Braining
View GitHub Profile
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>My Framework</title>
</head>
<body>
/* Use this to cause a function to fire no more than once every 'ms' milliseconds.
For example, an expensive mousemove handler:
$('body').mouseover(ratelimit(function(ev) {
// ...
}, 250));
*/
function ratelimit(fn, ms) {
var last = (new Date()).getTime();
@eculver
eculver / css color + text shadow
Created April 28, 2010 19:58
css color + text shadow
/* http://www.newthink.net */
color: #2a2a2a;
text-shadow: rgba(0, 0, 0, 0.113281) 2px 2px 0px;
/* http://ozmm.org */
color: red;
text-shadow: #0c0c0c 2px 2px 1px;
/* http://peroty.tumblr.com */
color: #f2e3c6;
<!doctype html>
<html>
<head>
<title>Test Page</title>
</head>
<body class="yui3-skin-sam">
<h1>Getting notification that a form is &quot;dirty&quot;</h1>
<p>This is an incomplete YUI 3.2 (post pr1) solution to monitoring whether a form has had any of its field values modified. It has only been tested against the given markup, and it doesn't address updating values programmatically.</p>
<form id="formId" action="">
<input type="text" name="text">
(function () {
try {
if (!google.doodle) google.doodle = {};
var a = 200,
g = -200,
j = -200,
k, l, m, n = 0,
o = 0,
p = 0,
q = 35,
@rphillips
rphillips / 256-colors
Created October 19, 2010 16:39
.tmux.conf
# Key Default Action
# h,| % Split window horizontally
# v,- " Split window vertically
# C-s o Go to next pane
# x x Kill the active pane
# q q Show pane numbers
# A-Arrow Key Resize the active pane
# C-Arrow Key Resize the active pane by one line or on character
#
unbind C-b
window.addEventListener "DOMContentLoaded", ->
body = $ "body"
canvas = $ "#canvas"
chalkboard = $ "#chalkboard"
close = $ "#close"
ledge = $ "#ledge"
lightswitch = $ "#lightswitch"
output = $ "#output"
shade = $ "#shade"
share = $ "#share"
@jefftriplett
jefftriplett / pyhowl.py
Created September 20, 2011 05:36
Post to Howl (http://howlapp.com) from Python
"""
pyhowl - Post to Howl (http://howlapp.com)
Copyright (c) 2011, Jeff Triplett
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice,
@dctrwatson
dctrwatson / format
Created November 11, 2011 07:43
Flatten uniform depth nested dicts
";" between domains
":" between domain and queues
"|" between queues
"?" between queue names and metrics
"," between metrics
@scottburton11
scottburton11 / gist:1479734
Created December 15, 2011 03:43
Ember.js tree
<html>
<head>
<script src="javascripts/jquery.js" type="text/javascript" charset="utf-8"></script>
<script src="javascripts/ember.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript" charset="utf-8">
App = Ember.Application.extend();
App.Node = Ember.Object.extend({
name: null,