warning: Creating default object from empty value in /home3/ideaquar/public_html/hugoestrada/modules/taxonomy/ on line 33.
Programming, computers, technology.

Vim macros, the quick and dirty, and Vim on Firefox

The goods:
To record: To record "keyo' do your macroee stuff here" q
To use: @"key"

The blah, blah, blah:

Okay, so I am ready to create a new macro on vim, and then I realized that I forgot how to make one. :(

I found this entry on how to do it. The best part about it is that the author forgot to talk about how you turn off the recording, so then the possibility of recursively calling the macro while you are recording was brought up. Nothing makes you smile like a random encounter with recursion!

Switching the up and shift button on an Eee

I recently got an Eee 1000. Nice little computer. The one mayor problem was dealing with the keyboard. For some reason they decided to put the up button where the right shift button is in American keyboards. Very annoying if you can touch type.

Fortunately I found this blog where the author pointed to a link on the eeeuser site that gives you a script to switch them around. The script also switches where the up and down button is, which is a bit disorienting, but easier to deal than not having the shift key where it should be.

Digi-comp working


This is my finished, working Digi-Comp, the mechanical computer from the 60s. You can read about it here

Create a "To Do" Drupal "Module" in 15 minutes -- No module installation necessary, No code writing

This tutorial will teach you how to create module-like functionality adding a To Do list functionality using the default installation for Drupal 6.6. The whole process takes less than 15 minutes, and now new modules have to be installed.

1. Enable PHP Filter Go to Administer-> Site Building -> Modules. Check the box for PHP Filter, and click Save Configuration.

2. Create a "Project" vocabulary Go to Adminster -> Content Management -> Taxonomy. Click on Add Vocabulary, enter a name. Under Content type, click on Story. Click Save.

3. Add "To Do" and "Done" terms to the Project vocabulary Go Go to Adminster -> Content Management -> Taxonomy. Under the list of vocabularies, find Project, and clik on its "Add term" link. Enter under Term Name "To Do" and click Save. Repeat steps to add "Done".

4. Create a new To Do Block Go to Administer -> Site Building -> Blocks -> Add Block. Name it "To Do". Under Input Format, click on PHP code. Copy and paste the code below

// comma separated lists of terms tid to display nodes
$term_name = "To Do";
$terms =  "SELECT tid from  {term_data} where name LIKE '" . $term_name  . "'";
// the number of nodes to show
$count = 10;
$sql = "SELECT n.title, n.nid FROM {node} n INNER JOIN {term_node} tn ON n.nid = tn.nid WHERE tn.tid in ($terms) AND n.status=1 ORDER BY n.created DESC";
$result = db_query_range(db_rewrite_sql($sql), 0, $count);
if ($result) {
  return node_title_list($result);
return t('No nodes available.');

Click on Save Block.

5. Enable Block Go to Administer -> Site Building -> Blocks. Find the block. Then select a position from the drop down menu called "Region."

You are done.

Electricity Unit Completed in a couple of hours!

Yesterday we got a curriculum to have a unit on electricity at Crunchy Granola Academy. Today we started it. it teaches about simple electrical circuits, and it contains a light bulb, a motor, an LED and a buzzer. It teaches also about insulators and serials and parallel circuits.

Well, we finished it in less than two hours. Alexander, my 3-year-old, got upset when we were done, and he said that he wanted more motor training. This means that the unit was a success. :)

Syndicate content