I’ve been working on a way to log to a browser’s console from php. So I’ve put together a wrapper class for php that makes it so you can log data and export it to the console. Check it out on github!
php console::log on Github!
In the image you can see the results of var_dump( $foo ) while in the browser’s console you can see the result of console::log( $foo )
If you’re like me, SQL joins can be hard to conceptualize. Here is a great diagram by C. L. Moffatt that helps visualize joins.
I’ve been doing some work with PHP and encrypting passwords to store them in a MySQL database. After reading a couple articles on the subject by Chris Lyon and Coda Hale I decided to see what kind of process time the crypt function offers since a longer process time can slow down rainbow table, dictionary and brute force attacks. I decided a Blowfish hash with a cost of 7 or 8 to be about right. Below is my bench marking:
And below is the code I used to generate the benchmark:
$start = microtime( true ) * 10000;
$salt = "$2a$08$";
crypt( "password", $salt )
$stop = microtime( true ) * 10000;
print ( $stop - $start ) . ' ms';
Well, I’ve started working on a new blog/indie game development. Check it out!
You’ve probably seen them. Bookmarklets that you can add to your bookmarks bar that pull text and other information from the page you are currently on.
From there you can add what you want to your external js file.
One problem I’ve encountered working with the HTML5 canvas and games is trying to keep a consistent refresh rate. I’ve found that once the game starts to heat up the game’s frame rate drops out. I’ve come up with an algorithm to help with this problem. Behold it in all it’s glory.
Let’s get right into it. Open Visual Studio (VS), click on New Project… under Start; click Visual C++; Select Empty Project; give the project the name “hello-world” (or whatever); and then click okay. This will build a new project.