Skip to content

Instantly share code, notes, and snippets.

View llkats's full-sized avatar
💭
still affable

Lydia Kats llkats

💭
still affable
View GitHub Profile
@llkats
llkats / gist:1927252
Created February 27, 2012 21:34 — forked from baileylo/gist:1926710
gdgt lunch decider
window.setTimeout(
function() {
(Math.floor(Math.random()*(100)) % 2 ) ? console.log('Chipotle') : console.log('Venue');
},
3600000 // deliberate for an hour before deciding
);
@llkats
llkats / cheatsheet.md
Last active April 18, 2025 05:44
git cheatsheet

git flow feature start <branchname>
starts a new branch

git commit -am "commit message"
make commits as usual

git pull
from master branch, pull in latest changes from the repo (repeat often)

git pull origin <branchname>

@llkats
llkats / coffee-debug.coffee
Created October 12, 2011 16:20
console debugging idiom
debug = if console?.log? then true else false
# ... #
console.log "error" if debug
@llkats
llkats / addAttachEvents.coffee
Created September 21, 2011 19:44
add/attach event listeners for modern browsers and IE
addListener = (elt, type, fn) ->
if elt.addEventListener then elt.addEventListener(type, fn, false)
else if elt.attachEvent then elt.attachEvent('on' + type, fn)
@llkats
llkats / preventDefaultTernary.js
Created September 21, 2011 19:43
preventDefault for modern browsers and IE
var genericHandler = function(evt) {
evt.preventDefault ? evt.preventDefault() : evt.returnValue = false;
};
@llkats
llkats / IE iframe scrollbar fix
Created March 9, 2011 18:01
Getting rid of scrollbars on an iframe
<html style="overflow-x:hidden"></html>
@llkats
llkats / Twitter Button CSS
Created February 28, 2011 16:25
custom Twitter button function
#custom-tweet-button {
width: 60px;
}
#custom-tweet-button a {
background: url('http://a4.twimg.com/images/favicon.ico') 1px center no-repeat;
border: 1px solid #ccc;
color: #437792;
display: block;
padding: 2px 5px 2px 20px;
text-decoration: none;