php console::log

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 )



It’s a little old, but check out PHP-CRUD on GitHub. I finally migrated it over from Google Code. 😀

SQL Joins

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.

PHP Chaining

I was mostly curious to see if it was possible to do javascript-like method chaining in PHP. Turns out you can! w00t!

Password Encryption with PHP

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:


New Site!

Well, I’ve started working on a new blog/indie game development. Check it out!

Bland Games.

Javascript Bookmarklets

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.

They are easier to implement than I thought they would be. You simply make the link append a Javascript file to the page and then add the code you want to the external js file.

This is the code needed to load an external javascript file by clicking a link.

From there you can add what you want to your external js file.

FPS Adjustment Algorithm

Clock GearsOne 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.

0x01 – Your First C++ Program

Your First C++ Program

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.

Starting a new project in VS

Figure 1.1—Starting a new project in VS

Time for Change

Blueprint of Victory

After that last post, I’m thinking it is time to redesign my site. That last post murdered the free layout. It’s time to roll my own.