January 2011
2 posts
3 tags
PHP Nested Comments using Redis
Just some random fun, a nested comments system using Redis only :
https://gist.github.com/803251
3 tags
Debugging Apache2 / PHP on Ubuntu
Yesterday i came across a little issue, after installing the Memcache extension (through the package manager on Ubuntu 10.10), my Apache was segfaulting. Since i just finished the setup of this box, they was too many possible culprit to just go ahead (and come on sunday) and just disable/reinstall the extension. So i decided to run Apache through gdb.
It’s not as easy as it sounds, if...
December 2010
3 posts
5 tags
RedisExtended
I decided to share my small library that i plugged on top of PhpRedis :
https://github.com/Mikushi/RedisExtended
Basically offers some extra functionality using Redis. I’ll be pushing more stuff, stack and message queue as soon as i have it fully tested locally.
5 tags
The fun of writing PHP Extensions
Lately i’ve been digging into writing PHP extension, for multiple reasons, first knowing the language from the inside can never hurt (and i would recommend for every PHP developer to take a look at the PHP internals, you’ll learn a lot), secondly, PHP being my primary language, i wanted to contribute, i’m not much of a QA person so writing test, no thanks, so i decided to take a...
3 tags
Asynchronous JavaScript Loading
Last week i stumble upon a JavaScript problem, how to load a JavaScript asynchronously across all platforms. Usually i would just put the script tag at the bottom of my page to prevent any blocking, but in some case (advertisement) the script tag needed to be on the top.
The default script we were given looks like this :
The problem with this is pretty simple, it only behaves as a...
October 2010
1 post
4 tags
Extracting infos from Apache access log
In the process of writing a “log watcher” to plug in with Live Graph, i needed to extract all the info from an access log. Assuming we have the standard access log from Apache:
172.16.10.23 - - [29/Oct/2010:10:39:51 -0400] “GET / HTTP/1.1” 200 10890 “-” “Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/534.7 (KHTML, like Gecko)...
September 2010
2 posts
3 tags
Autocomplete with Redis
Here is a PHP implementation of Antirez’s autocomplete example in Ruby using Redis. The full explanation for this algorithm can be found here:
http://antirez.com/post/autocomplete-with-redis.html
I’m using the Redis php extension, you can download it here:
http://github.com/owlient/phpredis
Here is the code :
3 tags
August 2010
5 posts
2 tags
Gorillaz: Honk Kong →
Probably one of my favorite piece of music out there.
1 tag
CSS3 Gradients generator →
If you’re like me, and you never remember the CSS instructions, here is a very cool tool to generate css3 gradients. It will generate the codes for WebKit based browsers (Safari and Chrome) and for Firefox. Enjoy.
2 tags
4 tags
Chrome PHP →
The equivalent of FirePHP (Firefox extension to use the console from php). Simple to use and very useful.
3 tags
php: static call on non-static function
Somebody asked on the php Google Group on how to make a static call on a non-static function. (don’t ask me why) Here is my (very nasty) solution :
<?php abstract class SomeClass { protected function test() { echo "test 42"; } } class AnotherClass extends SomeClass { private static $_instance = null; public static function __callStatic($name, $args) {...
April 2010
8 posts
5 tags
Apple vs Adobe, round two. Fight!
Shantanu Narayen, CEO of Adobe, sits down with Wall Street Journal’s Alan Murray and get back at Steve Jobs. Way to go champ!
I’m not gonna lie, i don’t like Apple that much lately (i mean even less than usual), that’s kinda sad because they offer some good products, too bad they are overpriced and seriously locked to Apple’s pipeline. The exclusion of Flash...
4 tags
HTML5 Video, is Flash dead?
The Holy Grail, the savior, the killer, the dead-born, I’ve heard a lot of things about HTML5 Video, from both sides of the fence (Flash Developer and HTML5 cheerleaders). So I said to myself, why not add my voice to the noisy battle going on now on the Internet.
Following the release of the iPad, I took the opportunity to try HTML5 Video as our traffic was growing fast on this device...
1 tag
You little liar Mr. Jobs →
Correcting the facts on the open letter from $teve Jobs about Flash. How about that motha fucka?
Steve Jobs on Flash, what about you go screw... →
Steve Jobs gives his thoughts on Flash, and as usual it’s full of shit. Not half of what he says is true, and the rest is so biased that it makes me sick…
4 tags
Be Consistent
If I had a list of things that annoy the shit out of me, lack of consistency in coding style would be on the top of it, or at least close to it.
What is worst than lurking into a library, a site source code, and being lost in the middle of an epic battle between 10 different coding styles. Camel case, no camel case, inconsistent naming convention, brackets on a new line, bracket at the end of the...
6 tags
I Work In Porn
So, that’s said. Let me introduce myself a little bit as we gonna be involved in some serious shit around here.
Like I just said, I work in the porn industry, I am the proud Lead Developer of Pornhub.com, been working in the industry for 3 years now. I started playing with Web technology 7 years ago, was a teenager bored by school, I had a computer, a brand new DSL connection, and a huge...