Today I read about how to link to archive.org videos…
Embedding archive.org videos…
Reply
Today I read about how to link to archive.org videos…
Today I used the MySQL convert_tz function.
Before I could use named timezones with convert_tz I had to load the timezones.
Turns out MySQL doesn’t load timezone info by default! As you can read about here.
To load MySQL timezone info:
mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql -u root -p mysql
Today I had to use PHP’s DateTimeZone->getOffset() to get a timezone offset. It needed formatting which I did with:
function timezone_offset() {
$offset = timezone()->getOffset( now() );
$hours = round( abs( $offset ) / 3600 );
$minutes = round( ( abs( $offset ) - $hours * 3600 ) / 60 );
$result = ( $offset < 0 ? '-' : '+' )
. ( $hours < 10 ? '0' : '' ) . $hours
. ':'
. ( $minutes < 10 ? '0' : '' ) . $minutes;
return $result;
}
Disabled Apache2 with:
update-rc.d -f apache2 remove
According to this article:
rewrite ^/store/view/product/(.*) /store/view.jsp?product=$1 permanent;
Followed these instructions!
This is pretty funny: porn sex vs real sex.
A few things I saw today that I want to keep a note of:
Robert Nozick, father of libertarianism: Even he gave up on the movement he inspired.
Watch This Girl Explain Everything You Need To Know To Be A God.