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
# add the following under `[alias]` | |
latest-tag = "!sh -c 'git tag | get_latest_version.rb' -" | |
recent-tags = "!sh -c 'git tag | get_latest_version.rb -c ${1}' -" |
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
# did not actually work | |
alias mycd="cd /path/to/directory/of/interest; | |
osascript ~/Library/Scripts/set-terminal-tab-title.scpt | |
`pwd | cut -d'/' -f5`;" |
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
// the "usual" way... | |
// (1a) init your class and assign to a variable: | |
var myWidget = new net.fd.SomeWidget(); | |
// now we have our instance | |
// (1b) call the method from your instance: | |
myWidget.inspectContext(); | |
// ...except inspectContext() tells returns false | |
// meaning that we created myWidget for nothing |
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
sudo chown -Rv rob:admin /configs |
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
set home to (path to home folder as string) | |
tell application "Finder" | |
if home & "Desktop:4Uploadr" exists then | |
return true | |
else | |
make folder at desktop with properties {name:"4Uploadr"} | |
end if | |
end tell |
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
cd /tmp/ | |
wget http://www.cs.washington.edu/homes/isdal/snow_leopard_workaround/java.1.5.0-leopard.tar.gz | |
tar -xvzf java.1.5.0-leopard.tar.gz | |
sudo mv 1.5.0 /System/Library/Frameworks/JavaVM.framework/Versions/1.5.0-leopard | |
cd /System/Library/Frameworks/JavaVM.framework/Versions/ | |
sudo rm 1.5.0 | |
sudo ln -s 1.5.0-leopard 1.5.0 |
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
// mutliple vars on multiple lines: | |
var a = "alpha"; | |
var b = "beta"; | |
var c = "chi"; | |
// vs. comma-separating the declarations: | |
var a = "alpha", b = "beta", c = "chi"; | |
// vs. comma-separating across multiple lines: | |
var a = "alpha", |
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
for item in *; | |
do | |
zip -m "${item}.zip" "${item}"; | |
done |
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
<scriptgroup id="group1" ordered="true"> | |
<script src="foo.js"></script> | |
<script src="bar.js"></script> | |
<script> | |
somethingInline(); | |
</script> | |
</scriptgroup> |
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
/** | |
* Apologies to Angus Croll; re: | |
* http://javascriptweblog.wordpress.com/2011/04/04/the-javascript-comma-operator/ | |
*/ | |
// Yes, I am being a pedantic jerk, but: | |
var r = [1], n = 0, a = 0, b, next; | |
function nextFibonacci(){ |