⌘T | go to file |
⌘⌃P | go to project |
⌘R | go to methods |
⌃G | go to line |
⌘KB | toggle side bar |
⌘⇧P | command prompt |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alfredapp://customsearch/caniuse/caniuse/ascii/url=http://caniuse.com/#eras=past,now,near&nodetails=1&search={query} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Calculated the number of weekdays (M-F) between two timestamps (inclusive). | |
* | |
* @param string $from the timestamp to start measuring from | |
* @param string $to the timestamp to stop measuring at | |
* @param string $normalise whether the time of day should be ignored (forces times to yyyy-mm-ddT00:00:00+00:00) | |
* @return int the number of weekdays between the two timestamps | |
* @author Matt Harris | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Emulate `unsafeWindow` in browsers that don’t support it. | |
// ==/UserScript== | |
// http://mths.be/unsafewindow | |
window.unsafeWindow || ( | |
unsafeWindow = (function() { | |
var el = document.createElement('p'); | |
el.setAttribute('onclick', 'return window;'); | |
return el.onclick(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<!-- | |
This is a simple experiment relying on ECMAScript 6 Proxies. To try this out, | |
use Aurora (http://www.mozilla.org/en-US/firefox/channel/). | |
The goal was to create a HTML writer where the method names were really just | |
the HTML tags names, but without manually creating each method. This uses | |
a Proxy to create a shell to an underlying writer object that checks each | |
method name to see if it's in a list of known tags. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@mixin ie6 { * html & { @content } } | |
#logo { | |
background-image: url("/images/logo.png"); | |
@include ie6 { background-image: url("/images/logo.gif"); } | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
yeti --connected | |
yeti info - checking for connected clients.. | |
yeti info - clients closed: 11 | |
yeti info - clients connected: 23 | |
yeti info - clients open: 23 | |
yeti info - browsers connected: | |
-------------------------------------------------------------------------------------------- | |
| Browser | OS | IP | | |
-------------------------------------------------------------------------------------------- | |
| Chrome (14.0.835.186) | Mac OS | 10.0.1.50 | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// New Y.throttle(). | |
Y.throttle = function (fn, duration, context) { | |
var lastTime = 0, | |
lastArgs, timeout; | |
duration || (duration = Y.config.throttleTime || 150); | |
function execute() { | |
var args = lastArgs; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" | |
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | |
<!-- IMPORTANT NOTE: This file is licensed only for use in providing the MobileMe service, | |
or any part thereof, and is subject to the MobileMe Terms and Conditions. You may not | |
port this file to another platform without Apple's written consent. --> | |
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<head> | |
<meta http-equiv="X-UA-Compatible" content="IE=Edge" /> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Use this one-liner to produce a JSON literal from the Git log: | |
git log \ | |
--pretty=format:'{%n "commit": "%H",%n "author": "%aN <%aE>",%n "date": "%ad",%n "message": "%f"%n},' \ | |
$@ | \ | |
perl -pe 'BEGIN{print "["}; END{print "]\n"}' | \ | |
perl -pe 's/},]/}]/' |