Awesome PHP has been relocated permanently to its own Github repository. No further updates will made to this gist.
Please open an issue for any new suggestions.
<?php | |
/** | |
* Remove any non-ASCII characters and convert known non-ASCII characters | |
* to their ASCII equivalents, if possible. | |
* | |
* @param string $string | |
* @return string $string | |
* @author Jay Williams <myd3.com> | |
* @license MIT License | |
* @link http://gist.github.com/119517 |
<?PHP | |
// Generates a strong password of N length containing at least one lower case letter, | |
// one uppercase letter, one digit, and one special character. The remaining characters | |
// in the password are chosen at random from those four sets. | |
// | |
// The available characters in each set are user friendly - there are no ambiguous | |
// characters such as i, l, 1, o, 0, etc. This, coupled with the $add_dashes option, | |
// makes it much easier for users to manually type or speak their passwords. | |
// | |
// Note: the $add_dashes option will increase the length of the password by |
#!/usr/bin/python | |
# | |
# git-slim | |
# | |
# Remove big files from git repo history. | |
# | |
# Requires GitPython (https://github.com/gitpython-developers/GitPython) | |
# | |
# References: | |
# - http://help.github.com/remove-sensitive-data/ |
Awesome PHP has been relocated permanently to its own Github repository. No further updates will made to this gist.
Please open an issue for any new suggestions.
This gist assumes:
<?php | |
/** | |
* CIDR.php | |
* | |
* Utility Functions for IPv4 ip addresses. | |
* Supports PHP 5.3+ (32 & 64 bit) | |
* @author Jonavon Wilcox <[email protected]> | |
* @revision Carlos Guimarães <[email protected]> | |
* @version Wed Mar 12 13:00:00 EDT 2014 | |
*/ |
[ | |
{name: 'Afghanistan', code: 'AF'}, | |
{name: 'Åland Islands', code: 'AX'}, | |
{name: 'Albania', code: 'AL'}, | |
{name: 'Algeria', code: 'DZ'}, | |
{name: 'American Samoa', code: 'AS'}, | |
{name: 'AndorrA', code: 'AD'}, | |
{name: 'Angola', code: 'AO'}, | |
{name: 'Anguilla', code: 'AI'}, | |
{name: 'Antarctica', code: 'AQ'}, |
This playbook has been removed as it is now very outdated. |
<script type="text/ng-template" id="one.html"> | |
<div>This is first template</div> | |
</script> | |
<script type="text/ng-template" id="two.html"> | |
<div>This is second template</div> | |
</script> |
/* ---------------------------------------------------------- */ | |
/* */ | |
/* A media query that captures: */ | |
/* */ | |
/* - Retina iOS devices */ | |
/* - Retina Macs running Safari */ | |
/* - High DPI Windows PCs running IE 8 and above */ | |
/* - Low DPI Windows PCs running IE, zoomed in */ | |
/* - Low DPI Windows PCs and Macs running Firefox, zoomed in */ | |
/* - Android hdpi devices and above */ |