Easton's blog

How not to order RAM

So, back in June or so, I ordered four sticks of 2GBs of RAM for my main workstation, DDR2 PC6400. Couldn't wait to get them right? So, a month goes by and they finally come in. Now, the board I have right now is a Supermicro X6DVL-EG2 which accepts ECC RAM. I thought my current RAM was non-ECC so I said fuck it and ordered non-ECC RAM. Wrong. RAM came in, tried it, motherboard beeped at me. Fuck. So I sent it back out east for a refund (to Newegg). A week or two goes by until I get the refund so I go ahead and order DDR2 PC6400 RAM.

Templating with Twig

I've been working on this shitty video sharing site for a couple weeks now and thought I'd try out some new things. I' used phpass for the password management and ended up using Twig as a template framework. I've never used a template engine before so I was new to using one. Twig is actually quite easy to implement into any of your projects. In your PHP script add:

 

require_once 'Twig/Autoloader.php';
Twig_Autoloader::register();

$loader = new Twig_Loader_Filesystem('templates');
$twig = new Twig_Environment($loader);
$template = $twig->loadTemplate('index.html');
echo $template->render(array('value' => 'test');

And that's it. In the example, 'index.html' is the template file. The array passes the variables onto the template. So, your index.html would look something like this:

 

This is a {{ value }} 

That would echo 'test'. The documentation for Twig is alright but it doesn't show how one uses the core extensions. See the below example as a block is transated for Twig's use:
 

      $a = $s + ($limit);
       if ($a > $numrows):
       $a = $numrows;
       endif;
       $b = $s + 1;
       echo "Showing results $b to $a of $numrows";

Becomes:

{% set a = s + limit %}
    {% if a > numrows %}
        {% set a = numrows %}
    {% endif %}    
{% set b = s + 1 %}  
   Showing results {{ b }} to {{ a }} of  {{ numrows }}

 

How publicly released exploits helped WorkSimple

[Photo by Honza Soukup]

A couple years back when I released WorkSimple, my PHP knowledge was very limited. I went through a couple versions of WorkSimple adding features and such but without thinking of security. Then, about a year and a half ago, I came upon a zero-day exploit site [1][2] site. On the site, it chronicled the current exploits in WorkSimple. Now, of course I acted quickly and fixed the problems. At first, I was offended by this. Then, I realized the helping hand it had lent me. Not only did these sites show how one could use the exploit, but also how to fix it. The user login system used MD5 hashed passowords in a specified [plain text] file in a specified place. After, the hashes were salted and in a .php file as not to display the contents. 

 

istatd Debian package

Sick of compiling istatd on every server that I want to be monitored, I finally got around to create a Debian package. Hopefully I did everything by the books, liscensing wise. Check the file attachments to download.

New hardware

 

So, I recently came into posession of an IBM Model M (1391401) and wow. This beats the hell out of my Logitech G15. A long with the keyboard, I thought I'd buy myself a new mouse while I was at it. Well, I ended up buying a Kensington Orbit with scroll ring.

 

Python Pastebin upload script

I made a Python script the other day to upload files from the command line to Pastebin. Check the attachements to download. 

Thanks Nyko, now I have an unusable Xbox!

A little while ago, I wrapped my 360 in a  wood Oblivion Xbox 360 skin. Lately, I've been getting more RROD's than usual. I'd be in the midst of a game and it'd shut off with three red flashing red rings. I've had the Nyko Intercooler on my Xbox for the last couple years and, I thought, would make the RROD problem go away. Apparently not. So today, I took off the Intercooler.

Oh, great

So, my SCSI drive came in the other day. Dropped it in a drive bay and fired up the server. But oh no, beeping arose. Looked up the beep code and now it's about the processor. Either the processor isn't seated well or I need to replace it. Awesome. I probably should have grounded myself before hand. Strange enough, if I change the jumper settings on the motherboard, from the default 700Mhz to 750Mhz, the beeping stops. Dell says the default speed is 550Mhz but I'm not sure if these are the default processors.

PowerEdge 6400

 

So I got this Dell PowerEdge 6400 and wow. First, this thing is gigantic. Eight hot swappable SCSI bays in the front. Free is a good price ;)

WorkSimple 1.3.4 released!

WorkSimple 1.3.4 has been released! Numerous fixes are included with this release, along with the removal of the uploader module as it had security risks. Download here.

Pages

Subscribe to RSS - Easton's blog
Powered by Drupal