View gist:10319990
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
<script> | |
var ar = [1,2,3]; | |
</script> | |
hi, i'm iframe |
View pre-push.sh
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/sh | |
# Called by "git push" after it has checked the remote status, | |
# but before anything has been pushed. | |
# | |
# If this script exits with a non-zero status nothing will be pushed. | |
# | |
# Steps to install, from the root directory of your repo... | |
# 1. Copy the file into your repo at `.git/hooks/pre-push` | |
# 2. Set executable permissions, run `chmod +x .git/hooks/pre-push` |
View git branch
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
# Modify prompt | |
function bash_git_branch | |
{ | |
git branch 2> /dev/null | grep \* | python -c "print '[git:'+raw_input()[2:]+']'" 2> /dev/null | |
} | |
function bash_hg_branch | |
{ | |
hg branch 2> /dev/null | python -c "print '[hg:' + raw_input()[0:] + ']'" 2> /dev/null | |
} | |
# PS1 = "\h:\W \u\$ " |
View email regex.php
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 | |
regex = '/^[\w!#$%&\'*+\/=?^`{|}~.-]+@(?:[a-z\d][a-z\d-]*(?:\.[a-z\d][a-z\d-]*)?)+\.(?:[a-z][a-z\d-]+)$/iD'; |
View Fix CSS browser quirks.css
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
/*remove the webkit orange/light-blue border around text-inputs and textareas */ | |
input:focus, textarea:focus{ | |
outline: none; | |
} | |
/*remove the ugly dotted borders around links in firefox*/ | |
a:focus{ | |
outline: none; | |
} |
View 2204355
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
1. Go to http://www.google.com | |
2. type: 2204355 | |
3. then 'I'm feeling lucky' | |
4. ENJOY |
View .htaccess No-www
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
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC] | |
RewriteRule ^(.*)$ http://%1/$1 [R=301,L] |