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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
#add alias | |
function newalias() { | |
echo alias $1=\"$2\" >> ~/.aliases | |
source ~/.bash_profile | |
} |
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
Simple JS Bookmarket to let you quicly copy just the hostname of a url. Chrome hides http:// in the url which makes it hard to easily copy and paste a hostname. If you use a shell or ftp client a lot you know what I am talking about. Here is the script: | |
javascript:void( | |
function(){var u = window.location.hostname.replace(/^www\./,''); | |
window.prompt('Copy URL to Clipboard CMD/CTRL + C',u); | |
}() | |
); |
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 o() { | |
result=${PWD##*/} | |
open 'http://'$result | |
} |
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
[blocked] The page at 'https://schema.org/address' was loaded over HTTPS, but ran insecure content from 'http://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js': this content should also be loaded over HTTPS. | |
address:1 | |
[blocked] The page at 'https://schema.org/address' was loaded over HTTPS, but ran insecure content from 'http://www.google.com/jsapi': this content should also be loaded over HTTPS. | |
address:1 | |
[blocked] The page at 'https://schema.org/address' was loaded over HTTPS, but ran insecure content from 'http://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js': this content should also be loaded over HTTPS. | |
address:1 | |
Uncaught ReferenceError: $ is not defined address:18 | |
[blocked] The page at 'https://schema.org/address' was loaded over HTTPS, but ran insecure content from 'http://www.google.com/jsapi': this content should also be loaded over HTTPS. | |
address:1 | |
Uncaught ReferenceError: google is not defined address:67 |
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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing! | |
VAGRANTFILE_API_VERSION = "2" | |
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | |
config.vm.box = "precise64" | |
config.vm.box_url = "http://files.vagrantup.com/precise64.box" | |
config.vm.network :private_network, ip: "192.168.33.21" |
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
" Remap :W to :w | |
command W w | |
+command Wq wq | |
" Better mark jumping (line + col) | |
nnoremap ' ` |
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
/* ======================================================================== | |
* DOM-based Routing | |
* Based on http://goo.gl/EUTi53 by Paul Irish | |
* | |
* Only fires on body classes that match. If a body class contains a dash, | |
* replace the dash with an underscore when adding it to the object below. | |
* | |
* .noConflict() | |
* The routing is enclosed within an anonymous function so that you can | |
* always reference jQuery with $, even when in .noConflict() mode. |
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
#!/bin/bash | |
PAGES=("http://www.example.com/" | |
"http://www.example.com/about.aspx" | |
"http://www.example.com/blog/" | |
"http://www.example.com/blog/?page=1") | |
for ((i = 0; i < ${#PAGES[@]}; i++)) | |
do | |
webkit2png ${PAGES[$i]} --fullsize | |
done |
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
#!/bin/bash | |
PAGES=( | |
"http://www.example.com" | |
"http://www.example.com/home" | |
"http://www.example.com/about" | |
) | |
for ((i = 0; i < ${#PAGES[@]}; i++)) | |
do | |
webkit2png ${PAGES[$i]} --fullsize |
OlderNewer