Skip to content

Instantly share code, notes, and snippets.

View rudirocha's full-sized avatar

Rúdi Rocha rudirocha

View GitHub Profile
@rudirocha
rudirocha / .htaccess
Created October 18, 2013 17:34
.htaccess Zend F2
RewriteEngine On
# The following rule tells Apache that if the requested filename
# exists, simply serve it.
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
# The following rewrites all other queries to index.php. The
# condition ensures that if you are using Apache aliases to do
# mass virtual hosting, the base path will be prepended to
@rudirocha
rudirocha / echo_date_dayAndMonth
Created October 2, 2013 22:15
Echo Date like 1 OUT
<h4><?php
$date = $n->getCreateDate();
$dateInfo = date_parse_from_format("Y-m-d H:i:s", $date);
echo ($dateInfo['day']);
?>
</h4>
<span><?php
$dateM = $n->getCreateDate();
$dateInfoM = date_parse_from_format("Y-m-d H:i:s", $dateM);
$unixTimestamp = mktime( $dateInfoM['hour'], $dateInfoM['minute'], $dateInfoM['second'], $dateInfoM['month'], $dateInfoM['day'], $dateInfoM['year'], $dateInfoM['is_dst']);
@rudirocha
rudirocha / 0_reuse_code.js
Created September 27, 2013 20:35
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console