Skip to content

Instantly share code, notes, and snippets.

View marioestrada's full-sized avatar

Mario Estrada marioestrada

View GitHub Profile
<script>
var ar = [1,2,3];
</script>
hi, i'm iframe
#!/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`
@marioestrada
marioestrada / git branch
Created February 17, 2011 14:35
Shows the current working branch on the prompt with the corresponding revision control software (Mercurial or Git).
# 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\$ "
<?php
regex = '/^[\w!#$%&\'*+\/=?^`{|}~.-]+@(?:[a-z\d][a-z\d-]*(?:\.[a-z\d][a-z\d-]*)?)+\.(?:[a-z][a-z\d-]+)$/iD';
/*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;
}
1. Go to http://www.google.com
2. type: 2204355
3. then 'I'm feeling lucky'
4. ENJOY
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,L]