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.
/** | |
* simple mustache-like templater | |
* http://mir.aculo.us/2011/03/09/little-helpers-a-tweet-sized-javascript-templating-engine/ | |
* ----------------------------------------------------------------------------------------- | |
* t('Hello, {{planet}}!', array('planet' => 'World'); | |
* returns 'Hello, World!'; | |
*/ | |
function t(s,d){ | |
for(var p in d) | |
s=s.replace(new RegExp('{{'+p+'}}','g'), d[p]); |
#301 Redirects for .htaccess | |
#Redirect a single page: | |
Redirect 301 /pagename.php http://www.domain.com/pagename.html | |
#Redirect an entire site: | |
Redirect 301 / http://www.domain.com/ | |
#Redirect an entire site to a sub folder | |
Redirect 301 / http://www.domain.com/subfolder/ |
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.