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
tell application "Finder" to set theObjects to selection | |
set nameForNewFolder to "Gathered" | |
tell application "Finder" | |
set myOrFilesContainer to (container of item 1 of theObjects) as alias | |
try | |
make new folder at myOrFilesContainer with properties {name:nameForNewFolder} | |
set myContainer to (folder nameForNewFolder of myOrFilesContainer) as alias |
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
# hide and show finder desktop | |
alias hidedesktop='defaults write com.apple.finder CreateDesktop -bool false && killall Finder' | |
alias showdesktop='defaults write com.apple.finder CreateDesktop -bool true && killall Finder' |
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
open ~/Applications/Google\ Chrome.app/ --args -user-agent="MobileSafari 1.1.3 - iPhone --- Mozilla/5.0 (iPhone; U; CPU like Mac OS X; en) AppleWebKit/420.1 (KHTML, like Gecko) Version/3.0 Mobile/4A93 Safari/419.3" |
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
Error: You have uncommitted modifications to Homebrew's core. | |
Unless you know what you are doing, you should run: | |
cd /usr/local && git reset --hard | |
So I run that, but it doesn't reset. Here's what the git status looks like for /usr/local afterwards: | |
# On branch master | |
# Untracked files: | |
# (use "git add <file>..." to include in what will be committed) |
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
SetEnvIf Request_URI "/page-to-protect" passreq | |
AuthType Basic | |
AuthName "Password Required" | |
AuthUserFile /path/to/.htpasswd | |
Require valid-user | |
Order allow,deny | |
Allow from all | |
Deny from env=passreq | |
Satisfy any |
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
var parser = document.createElement('a'); | |
parser.href = "http://example.com:3000/pathname/?search=test#hash"; | |
parser.protocol; // => "http:" | |
parser.hostname; // => "example.com" | |
parser.port; // => "3000" | |
parser.pathname; // => "/pathname/" | |
parser.search; // => "?search=test" | |
parser.hash; // => "#hash" | |
parser.host; // => "example.com:3000" |
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
// assigns random background color to help with layout. | |
$(".target").each(function() { | |
var hue = 'rgb(' + (Math.floor((256-199)*Math.random()) + 200) + ',' + (Math.floor((256-199)*Math.random()) + 200) + ',' + (Math.floor((256-199)*Math.random()) + 200) + ')'; | |
$(this).css("background-color", hue); | |
}); |
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
#/bin/bash | |
for F in $(cat ./filelist.txt) ; do | |
mv $F ./uploaded/ | |
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
function o() { | |
currentDir='.' | |
open ${1-$currentDir} | |
} |
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
$(function() { | |
}); |
OlderNewer