Skip to content

Instantly share code, notes, and snippets.

View karbassi's full-sized avatar
🌱

Ali Karbassi karbassi

🌱
View GitHub Profile
$('#something')
.queue(function(){
$(this).addClass("turned-on");
$(this).dequeue();
})
.delay(2000)
.queue(function(){
$(this).removeClass("turned-on");
$(this).dequeue();
})
function foldl(f, z, xs) {
return xs.length === 0 ? z : foldl(f, f(z, xs[0], xs.slice(1)));
}
function foldr(f, z, xs) {
return xs.length === 0 ? z : f(xs[0], foldr(f, z, xs.slice(1)));
}
[user]
name = Your Name
email = your@email.com
[color]
status = auto
branch = auto
diff = auto
ui = auto
[color "branch"]
current = yellow reverse
#!/bin/bash
# Downloads and installs the latest version of Chromium onto your Mac OS X.
# Requires curl, unzip, and rsync.
set -eu
curl="/usr/bin/curl"
unzip="/usr/bin/unzip"
rsync="/usr/bin/rsync"
// what does this do?:
(function(){
var i = 5;
}());
// What this does is create an anonymous function then assigns a local variable 'i'
// with an integer value of 5 to it. Then it runs the function.
$.fn.duplicate = function(count, cloneEvents, callback) {
var stack = [], el;
while(count--) {
el = this.clone( cloneEvents );
callback && callback.call(el);
stack.push( el.get()[0] );
}
return this.pushStack( stack );
};
<?xml version='1.0' encoding='UTF-8'?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:apps='http://schemas.google.com/apps/2006'>
<title>Mail Filters</title>
<id>tag:mail.google.com,2008</id>
<updated>2010-09-24T07:17:47Z</updated>
<entry>
<category term='filter'></category>
<title>Mail Filter</title>
<id>tag:mail.google.com,2008</id>
<updated>2010-09-24T07:17:47Z</updated>
<content></content>
@karbassi
karbassi / index.html
Created October 21, 2010 22:02
How to handle single and double click events separately in javascript.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Single and Double Click</title>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<div id="the_div"></div>
<span>Double click the block</span>
[2010-11-18: REVISION 1623]
[FIXED] Java bundle’s Compile & Run again works with non-ASCII source code.
[FIXED] Include latest Ruby on Rails bundle.
[FIXED] Avoid using fcntl(F_SETOWN) when Interactive Input is not present. Ticket F66289D9.
[NEW] It is possible to set DisableColumnSelectionTogglingOnOption (via defaults write) to disable ⌥ behavior. Ticket 5C202273.
@karbassi
karbassi / gist:1406676
Created November 29, 2011 21:42
Base File.sublime-settings
{
"auto_indent": true,
"color_scheme": "Packages/Color Scheme - Default/Sunburst.tmTheme",
"ensure_newline_at_eof_on_save": true,
"font_face": "Monaco",
"font_size": 11,
"highlight_line": true,
"tab_size": 3,
"translate_tabs_to_spaces": true,
"trim_automatic_white_space": true,