You are here

flying monkeys

4000 series CMOS 24 hour clock

 For the last couple months a friend and I have been working on a 4000 series based clock in electronics class. After having failed building a FM receiver, we opted for a clock. We didn't go the microcontroller way, but old school ICs. So, we created a circuit for a simple clock. I opted for a 24-hour version, while my friend made the 12-hour equivalent. 

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 }}

 

Life update

Haven't posted in a bit, thought I'd tell everyone that I'm still alive. Schools started again, so that'll take some time away from coding. New motherboard has been running superbly. One of my other computers with an Asus P4PE board has a voice over when it's booting. So the other day, it's booting up and I hear voices coming from the headset. Finally figure out it's the BIOS that's speaking to me. I will say that I do admire my Solaris server. It's quite rock-solid (well, other than the random reboots when untar'ing something large) and everything feels like it's complete.

Other than that, life's been the same. My breadboard came in a little while ago so I've been experimenting with IC's and such. 

Well, back to doing nothing.

Dual Xeon build

I've had these Xeon processors sitting around for a while now and I thought it's about time to get a motherboard for them. Two are clocked at 3.0Ghz/1MB/800, other two are at 2.8Ghz/512/533. I ordered a Super Micro X6DVL-EG2  from eBay for $120 of which I seen this motherboard up to $250. Anyway, came the other day and finally put it together. Heatsinks didn't screw into the case as it should, so I had to screw the nut right onto the heatsink. 

iPhone borken

Yes, I purposely spelled that wrong. Anyway, the entire left of the touchscreen on my iPhone doesn't work. Plugged it in at night, then didn't work in the morning. So, I've had to suffer only using the right side of the screen for the last two weeks. Going to have to restore back to factory defaults, package it up and send it off.

 

Pages

Subscribe to RSS - flying monkeys