This file contains 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
[alias] | |
a = add . | |
s = status | |
p = push | |
c = checkout | |
po = push origin |
This file contains 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
// File: | |
// click.m | |
// | |
// Compile with: | |
// gcc -o click click.m -framework ApplicationServices -framework Foundation | |
// | |
// Usage: | |
// ./click -x pixels -y pixels | |
// At the given coordinates it will click and release. |
This file contains 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
/System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -activate -configure -access -on -users admin -privs -all -restart -agent -menu |
This file contains 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
window.log = function(){ | |
log.history = log.history || []; // store logs to an array for reference | |
log.history.push(arguments); | |
if(this.console){ | |
console.log( Array.prototype.slice.call(arguments) ); | |
} | |
}; |
This file contains 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
(function ($, document) { | |
$(document).ready(function () { | |
// Assign some vars to help cache the dom | |
var holder = $('.toggle-reveal'); | |
// Hide divs if javascript is enabled | |
holder.find('.revealed').hide(); | |
// On click for links |
This file contains 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
// Check existence | |
function exists(thing) { | |
return (typeof thing !== 'undefined' && thing !== null) ? thing : undefined; | |
} | |
/* | |
Usage... | |
var options = { | |
latitude: 0, |
This file contains 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
## Change the message in your last commit | |
git commit --amend -m "New commit message" |
This file contains 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
Font stacks based on system fonts | |
--------------------------------- | |
Times New Roman stack | |
font-family: Cambria, "Hoefler Text", Utopia, "Liberation Serif", "Nimbus Roman No9 L Regular", Times, "Times New Roman", serif; | |
Georgia stack: | |
font-family: Constantia, "Lucida Bright", Lucidabright, "Lucida Serif", Lucida, "DejaVu Serif," "Bitstream Vera Serif", "Liberation Serif", Georgia, Palatino, Palatino Linotype, Times, Times New Roman, serif; | |
Garamond stack |
This file contains 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
// previous code condenced to make sense of code | |
this.slides = $('.slides'); | |
// loop through each slide with a delay to slide in | |
_.each(this.slides, function (v, k) { | |
// slide in slide | |
$(this.slides[k]).delay(200 * k).animate({ | |
top: '0px', | |
opacity: 1 | |
}, 800); |
This file contains 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 | |
function color_brightness($hex, $percent) { | |
// Work out if hash given | |
$hash = ''; | |
if (stristr($hex,'#')) { | |
$hex = str_replace('#','',$hex); | |
$hash = '#'; | |
} |