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
<select id="state" name="state"> | |
<option value="">Select One</option> | |
<optgroup label="Canadian Provinces"> | |
<option value="AB">Alberta</option> | |
<option value="BC">British Columbia</option> | |
<option value="MB">Manitoba</option> | |
<option value="NB">New Brunswick</option> | |
<option value="NF">Newfoundland</option> | |
<option value="NT">Northwest Territories</option> | |
<option value="NS">Nova Scotia</option> |
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
<?php | |
define('LANG_ENGLISH', 'en'); | |
define('LANG_FRENCH', 'fr'); | |
define('LANG_SPANISH', 'es'); | |
// Look for l in query string and set as language. | |
$language = isset($_GET['l']) ? $_GET['l'] : LANG_ENGLISH; | |
/** |
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
find . -name .svn -print0 | xargs -0 rm -rf |
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
aside.left { | |
float: left; | |
width: 600px; | |
margin-left: 0; | |
margin-right: -600px; | |
} | |
aside.right { | |
float: left; | |
width: 200px; |
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
<?php | |
$countries = array( | |
'AF' => 'Afghanistan', | |
'AL' => 'Albania', | |
'DZ' => 'Algeria', | |
'AS' => 'American Samoa', | |
'AD' => 'Andorra', | |
'AO' => 'Angola', | |
'AI' => 'Anguilla', |
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
## Number of files in current working directory | |
ls -lA | wc -l | |
## Number of files in current working directory (recursive) | |
find . -type f | wc -l |
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
find . -not \( -name .svn -prune -o -name .git -prune \) -type f -print0 | xargs -0 sed -i '' -E "s/[[:space:]]*$//" |
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
/** | |
* jQuery Query Plugin by M. Pezzi | |
* Version: 1.0 (08/25/11) | |
* https://gist.github.com/1170858 | |
* Dual licensed under the MIT and GPL licences: | |
* http://www.opensource.org/licenses/mit-license.php | |
* http://www.gnu.org/licenses/gpl.html | |
* Requires: jQuery v1.4.2 or later | |
*/ | |
(function($){ |
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
/** | |
* jQuery Delayed Hide Plugin by M. Pezzi | |
* Version: 1.0 (08/25/11) | |
* https://gist.github.com/1171181 | |
* Dual licensed under the MIT and GPL licences: | |
* http://www.opensource.org/licenses/mit-license.php | |
* http://www.gnu.org/licenses/gpl.html | |
* Requires: jQuery v1.4.2 or later | |
*/ | |
(function($){ |
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
<?php | |
/** | |
* Validate a phone number. | |
* | |
* @param $value | |
* A phone number as string. | |
* @param $formats | |
* The formats to validate for. | |
* @return |
OlderNewer