Skip to content

Instantly share code, notes, and snippets.

$('input[placeholder]').each(function()
{
var input = $(this);
$(input).val(input.attr('placeholder')).addClass('placeheld');
$(input).focus(function() {
if (input.val() == input.attr('placeholder'))
input.val('').removeClass('placeheld');
});
@Lasha
Lasha / .gitconfig
Created October 17, 2012 04:57 — forked from buzzedword/.gitconfig
Public Global .gitconfig
[user]
name = John Doe
email = [email protected]
[color]
ui = true
status = auto
branch = auto
[alias]
st = status
@Lasha
Lasha / Bash crap.sh
Created October 17, 2012 04:51 — forked from buzzedword/Bash crap.sh
Initial setups
# Xcode
open http://itunes.apple.com/us/app/xcode/id497799835?mt=12
# Homebrew
/usr/bin/ruby -e "$(/usr/bin/curl -fsSL https://raw.github.com/mxcl/homebrew/master/Library/Contributions/install_homebrew.rb)"
# Git
brew install git
# Git Flow
@Lasha
Lasha / Bash crap.sh
Created October 17, 2012 00:53 — forked from buzzedword/Bash crap.sh
Initial setups
# Xcode
open http://itunes.apple.com/us/app/xcode/id497799835?mt=12
# Homebrew
/usr/bin/ruby -e "$(/usr/bin/curl -fsSL https://raw.github.com/mxcl/homebrew/master/Library/Contributions/install_homebrew.rb)"
# Git
brew install git
# Git Flow
@Lasha
Lasha / jQuery_bitlyfi.js
Created July 28, 2012 05:07 — forked from qwertypants/jQuery_bitlyfi.js
Create a bit.ly URL by passing the URL you want shortened and preforming a function with it
function bitlyfi(url, func) {
// Put your own login and apiKey
var defaults = {
login: '',
apiKey: '',
longUrl: url
};
// Build the URL to query
var bitly = "http://api.bit.ly/v3/shorten?" + "&login=" + defaults.login + "&apiKey=" + defaults.apiKey + "&longUrl=" + defaults.longUrl + "&format=json&callback=?";
@Lasha
Lasha / piracy.js
Created June 22, 2012 15:46 — forked from buzzedword/piracy.js
Downloading Calvin & Hobbs
// On http://imgur.com/a/EYCTw
// Open Console
var downloadString = '';
$('.image-hover.download a').each(function(i){
downloadString += 'echo "Downloading '+ (i+1) + '.jpg..."\n\r';
downloadString += 'curl -L http://www.imgur.com' + $(this).attr('href') +' -o '+ (i+1) + '.jpg\n\r';
downloadString += 'echo "Finished! Waiting 3 seconds before continuing..."\n\r';
downloadString += 'echo \n\r';
downloadString += 'sleep 3 \n\r';