return to OCLUG Web Site
A Django site.
April 19, 2012

Jean Richard
geemoo
Geemoo dot ca
» New Udev, Old Xilinx

I updated my system lately and rebooted to find that the udev rules I was using to make my jtag programmer work, no longer worked. I had been getting messages about the rules being old and being deprecated soon for some time now, but it seemed that "Real Soon Now" had suddenly became "Now".

The new rules look like this:

SUBSYSTEM=="usb", ACTION=="add", ATTR{idVendor}=="03fd", ATTR{idProduct}=="0007", RUN+="/sbin/fxload -v -t fx2 -I /usr/share/xusb_xp2.hex -D $tempnode" SUBSYSTEM=="usb", ACTION=="add", ATTR{idVendor}=="03fd", ATTR{idProduct}=="0009", RUN+="/sbin/fxload -v -t fx2 -I /usr/share/xusb_xp2.hex -D $tempnode" SUBSYSTEM=="usb", ACTION=="add", ATTR{idVendor}=="03fd", ATTR{idProduct}=="000d", RUN+="/sbin/fxload -v -t fx2 -I /usr/share/xusb_xp2.hex -D $tempnode" SUBSYSTEM=="usb", ACTION=="add", ATTR{idVendor}=="03fd", ATTR{idProduct}=="000f", RUN+="/sbin/fxload -v -t fx2 -I /usr/share/xusb_xp2.hex -D $tempnode" SUBSYSTEM=="usb", ACTION=="add", ATTR{idVendor}=="03fd", ATTR{idProduct}=="0013", RUN+="/sbin/fxload -v -t fx2 -I /usr/share/xusb_xp2.hex -D $tempnode" SUBSYSTEM=="usb", ACTION=="add", ATTR{idVendor}=="03fd", ATTR{idProduct}=="0015", RUN+="/sbin/fxload -v -t fx2 -I /usr/share/xusb_xp2.hex -D $tempnode" SUBSYSTEM=="usb", ACTION=="add", ATTR{idVendor}=="03fd", ATTR{idProduct}=="0008", MODE="666"

March 10, 2011

Jean Richard
geemoo
Geemoo dot ca
» IPv6 Summit

So.. it looks like work is sending me to the IPv6 Summit. Since we're a company that makes hardware network devices, I'm pretty excited, as this is a topic we really need to be looking into. Stay tuned, more details to come.

March 6, 2011

Jean Richard
geemoo
Geemoo dot ca
» Getting rid of default search keywords

If you ever get annoyed by searching for something on debian from your vimperator command line, and get annoyed at it using the debian package search engine, you can thank jcn for mentioning this tip to me. Inside vimperator, you can type :dialog search<stab><enter> and it will open up a dialog box with the search of search engines and keywords installed so that you can remove or change the ones that bother you.

I don't know how to open this dialog within firefox normally (ie: without the vimperator plugin).. I don't see any menu item for it anywhere. So, if you know, feel free to send me a message and I can update that here.

November 14, 2010

Jean Richard
geemoo
Geemoo dot ca
» Encrypting Partitions on Linux

I've recently started to encrypt my backup drives, so I had to learn how to do this instead of just letting debian's init scripts to take care of it for me. Turns out it's quite easy. In my case, I was encrypting /dev/sdd1 and named my partition "backup". Substitute those values for whatever device and name you use.

# cryptsetup luksFormat /dev/sdd1
# cryptsetup luksOpen /dev/sdd1 backup
# mkfs -t xfs /dev/mapper/backup 
# mount /dev/mapper/backup /mnt/backup

That's it, when you're done with the device, umount the /dev/mapper/backup device, and then do a cryptsetup luksClose backup.

October 19, 2010

Jean Richard
geemoo
Geemoo dot ca
» Nvidia + GLX for a Quadro Card on Debian

I just went through the process of getting my older nvidia card working on debian, and decyphering the exact list of steps was a bit irritating, so I'm recording it here for everyone (including myself) to enjoy later on. I'm writing this down after completing the process (and I'm certainly not going to start over again), so this is from memory, and hopefully I'm getting all the steps in the right order.

  1. First off, you need to install the linux headers (and possibly the linux source) for your kernel. I did these steps out of order, so I can't say if the linux source tree is really required. Things started working for me once I installed the headers, so those are certainly required. apt-get install linux-headers-$(uname -r).

  2. Next up, idenfity what card you have, and what nvidia-glx package supports it. Run lspci and it will show you a list of hardware installed.. my card is shown below.
    01:00.0 VGA compatible controller: nVidia Corporation NV37GL [Quadro PCI-E Series] (rev a2)
    Take the card type, (in my case NV37GL) and do a google search for NV37GL glx debian. This will produce a list of debian packages, and hopefully you'll see a results that looks like Debian -- Details of package nvidia-glx-legacy-173xx in sid. The version doesn't matter, we're just looking for the name here. Apt-get can handle the details. (there should be a way to get this info from apt-cache, but it's not producing results for me. Feel free to send comments on how to make this work.)

  3. Run apt-get install nvidia-glx-legacy-173xx (or whatever package google found for you.) This will install the module you need and whatever dependencies it requires. If you have the require kernel source installed, you should see a message about it building for your currently installed kernel. If you see a message that looks like Module build for the currently running kernel was skipped since the kernel source for this kernel does not seem to be installed., it couldn't find your source tree and you need to try step 1 again.

  4. Once you're done that, get into console mode by doing init 1 or /etc/init.d/slim stop (substitute slim for gdm, kdm, xdm, whatever), and then go over to /etc/X11 and run X -configure to generate a new X configuration. Move the file over to /etc/X11/xorg.conf and then edit the file. Find the line that says Driver "nv" and change it to say Driver "nvidia".

  5. Save, exit, restart X. Once started, you should be able to open a terminal, run glxinfo and get results saying that glx is working.

  6. Celebrate! yay!

If you find any errors, or better ways to do that, please send me and email and I'll update appropriately. Good luck!

March 15, 2010

Jean Richard
geemoo
Geemoo dot ca
» CPU Speed Status Bar Monitor for wmii

So, I recently bought a new computer, and this one is a dual core and supports all kinds of dynamic speed adjusting goodness, which apparently my last CPU did not. While this is all great, there is a bit of a downside.

Down in the status bar of the window manager I use (wmiirc-lua), there is a little box indicating the current scaled CPU speed that each core is running at. As a result of the new dynamicness, the contents of that box are changing all the time. I was going to remove it entirely, but instead decided to write a graphical version of the same. The result of this effort is a wmii plugin called CPU Graph. Upon configuring wmii to load this, it'll create a 10 character scrolling ASCII bar indicating the current CPU speed.

I've got it up at github for the moment, until bartman gets a chance to merge it into the tree.

Download. Install. Enjoy the ASCII goodness.

March 10, 2010

Jean Richard
geemoo
Geemoo dot ca
» Turning off Magnetic Net Mode in gschem

I searched for this options for 15 minutes, so I'm posting this here so I don't have to again.

If you're like me and find the magnetic nets always connect to the wrong stuff, you can turn them off! You can do so by adding (magnetic-net-mode "disabled") to your ~/.gschemrc or to a gafrc in your project directory.

February 5, 2010

Jean Richard
geemoo
Geemoo dot ca
» Reinstalling GRUB on an Ubuntu install

So, I recently had to fix an ubuntu install after Windows had been reinstalled onto the drive.. end result: of course Windows tromped over the MBR and wiped out grub, making the computer automatically boot into windows. The fix is to get booted into Ubuntu and reinstall grub. If you're a debian user, the best way I found to do this is:

  1. Download the Ubuntu liveCD for whatever version of ubuntu you are trying to fix. Don't forget to download the 64bit version if you're trying to fix a 64bit install of Ubuntu.
  2. Do a google search for the usb-creator package for a not quite cutting edge version of ubuntu. While it would be awesome if this package were in debian, I'm sure the demand for it is pretty low, since it seems to be an Ubuntu creation. I am running Debian Squeeze/testing, and had good results using the usb-creator from Jaunty, which can be found here. (It'd be nice if you could just dd the iso to the usb drive and have it work, but alas I tried that, and it does not boot.)
  3. Download and install usb-creator via dpkg -i
  4. Insert a USB disk that you don't mind getting wiped, run usb-creator, select your liveCD iso file and usb disk, click format, and then Create disk.
  5. Wait forever.
  6. Pop the USB stick into the busted machine, and boot from the usb drive into the first menu with the install options.
  7. Move the cursor over the first option for "Try Ubuntu Live CD without changes" and press <TAB> to edit the menu command. Replace the boot=whatever parameter with root=/dev/sdXY, where sdXY is whatever partition your Ubuntu install is on.
  8. Press <ENTER> and boot up into your Ubuntu install.
  9. Open up a terminal, run sudo bash to get to a root shell.
  10. Run update-grub to update your grub configuration file.
  11. Run grub-install /dev/sdX, where sdx is whatever drive you boot off.. probably sda. (NOT sda1)

    Once that finishes successfully, you should be able to reboot the machine and grub will start up, allowing you to select what install you which to use. There might be an easier way to do this, but since I'm not a regular Ubuntu user, this is what I found through web searchs and trial and error. If someone has an easier way, please do fire me an email and I'll update this post.

August 29, 2009

Jean Richard
geemoo
Geemoo dot ca
» Google Calculator for Bender

I used to have a Supybot, but I eventually got rid of it because I didn't want to have to use python to make it do things.

I instead got myself a bender bot (a BasicBot::Pluggable perl bot) from dave0. I wanted a calculator for it, so I whipped up GoogleCalc. GoogleCalc uses the power of google's calculator and will respond to calc commands in channel. It's awesome, only because google calculator is awesome.

Note: There is an existing Google Calculator BasicBot module, but it seemed much more complicated than I needed and didn't come with examples or docs as to how to install it in a bender bot. It's entirely possible it's not supposed to be installed into a bender bot. This way seemed much easier.

Grab GoogleCalc.pm and copy it into your modules directory, and edit your yml config file to load it on startup. Talk to it via the calc command.

15:10:02 [ ManOnIRC] MagicBot: calc 1 + 2
15:10:03 [ MagicBot] ManOnIRC: 1 + 2 = 3
15:10:15 [ ManOnIRC] Thanks MagicBot! You rock!

June 24, 2009

Jean Richard
geemoo
Geemoo dot ca
» CW sample file generator

I've been thinking about learning morse code (AKA CW) for a while, and after last weekend, I've finally convinced myself that I want to do it. So, my first step was to write myself a little script to generate CW practice files that I can listen to on the bus rides to work. Running the script will generate a text file, and an mp3 file. The general idea is that you load up mp3 file onto your ipod, decode the message on paper (or in your head, if you're that good), and then compare it against the text version to see how many mistakes you made.

The script uses an assortment of tools, all of which were fairly easy to acquire. The list comprises the following: QSO, sox, lame, cwpcm and ofcourse bash. You can get the list of tools by doing a apt-get install morse lame sox. cwpcm you have to compile from source, I'm afraid. You can grab it at http://cwtext.sourceforge.net/.

Once you've got all that, run it at your command line, with the number of samples you wish to generate. If you're going to make a large number, I recommend going for coffee. The mp3 conversion step is time consuming. At the top of the script, there are two variables you can play with.. the characters per minute, and the words per minute, which affect the speed that the morse is played at.

# ./gencw.sh 50
cw-4WPM-8CPM-0001....
cw-4WPM-8CPM-0002....
cw-4WPM-8CPM-0003....
<and so on>

You can download the script at http://geemoo.ca/files/gencw.sh.

June 16, 2009

Jean Richard
geemoo
Geemoo dot ca
» Flushing the Mail Queue in Exim

I always seem to forget how to do this, so perhaps blogging it will help. If you ever want to force exim to attempt to resend its queued message, even if they are frozen or not, can you can this by running exim -qff. This will force it to go through all messages it has and attempt to resend each one.

» Apache Authentication... Valid User OR from this IP

This is really simple, but it took me a bit of digging to find it, so that's why I'm posting it here. I have a directory that I want to protect. To access it, you have to be either 1) an authenticated user, or 2) on my local LAN.

Step 1. Create an .htpasswd file as you normally would with the htpasswd command.
Step 2. Create an .htaccess file that looks like this.

AuthName "My private directory of stuff"
AuthType Basic
AuthUserFile /the/path/to/the/.htpasswd
AuthGroupFile /dev/null
require valid-user
Order allow,deny
Allow from 192.168.0
Satisfy Any

June 14, 2009

Jean Richard
geemoo
Geemoo dot ca
» Sunset on the River


Jess and I went for a walk last night, and ended up heading down along the canal and ending up at the river. We got there just as the sun was hitting the skyline, right behind a patch of heavy clouds. I noted that it looked quite nice.

May 20, 2009

Jean Richard
geemoo
Geemoo dot ca
» 2009 Tulip Festival - Better Days


Another one of the photos from the tulip festival that I liked. This flower though has seen... better days.

May 19, 2009

Jean Richard
geemoo
Geemoo dot ca
» Amateur Radio Question Pool Study Aid

I mentioned that I had a text file of a list of all the questions in the Amateur Radio Advanced License Question pool and someone asked for a copy they could study from. As a result, I'm making it available here, so feel free to make use of it if you wish.

Versions
Text
PDF

May 18, 2009

Jean Richard
geemoo
Geemoo dot ca
» War Museum - In the Trenchs


Was at the War Museum on Saturday and one of the exhibits that I really liked was the trench exhibit. It's a poorly lit room that's done up to look like a trench, with an armed soldier waiting for anyone to come over the top. I wasn't properly equipped last year to get this shot, but since then, I've picked up a 50mm f1.8, making it difficult, but possible now. Had to shoot at multiple stops below par, while leaning against the trench wall, but it turned out not bad.

» Tulip Festival 2009 - White Bloom


So.. I made the anually trek to the tulip festival and came out with a number of photos that I'm quite pleased with. Here's the first of them, a white tulip converted to a black and white photo.

May 10, 2009

Jean Richard
geemoo
Geemoo dot ca
» ExHaminer Advanced Question Bank

When I was studying for my Basic Amateur Radio Licence, there were a couple programs which would generate sample test programs for you. I had gotten to like the one that was produced by RAC called ExHaminer.

I'm now studying for my Advanced Licence, and I was dissappointed to find that they didn't have an Advanced question bank available, and for a while, I tried using the tool from Industry Canada, but 1) I didn't like the interface nearly so much, 2) they didn't have features to let me go back and review the answers I got wrong and see what the right answer was, and 3) I higly suspected that they were hiding questions on me.

So, I decided to use my text-processing-fu and convert the RIC-8 PDF into the question bank format that ExHaminer expects. I have uploaded the Advanced Question Bank to my site, but will be talking to someone from RAC and seeing if they can upload this to their site too. To use this file, just download the file and save it in the directory where your ExHaminer.exe program is located. The next time you start the ExHaminer program, "Advanced" will be available from the question banks to choose from.

May 9, 2009

Jean Richard
geemoo
Geemoo dot ca
» Copy a DVD in Linux

I recently had to make a copy of a DVD for someone, and found a tool called k9copy. Seems to work well, has a copy to ISO version, and it gets all the menus and various tracks properly.

March 23, 2009

Jean Richard
geemoo
Geemoo dot ca
» Debian packages for gEDA and PCB from the git repository

I've managed to build debian packages for squeeze for gEDA (gschem, gsymcheck, etc) and pcb. I've setup a repo with the files, which I will attempt to keep reasonably up-to-date. I'm doing some basic tests before uploading, but these packages are provided _AS_IS_, as they're coming straight from the repo. I'm using the same packages for my own stuff though, so if there are any problems, they should get noticed pretty quickly.

You can add the repo to your sources by adding deb http://geemoo.ca/debian geemoo-squeeze main to your sources.list, or just download the files manually from http://geemoo.ca/debian/dists/geemoo-squeeze/main/binary-i386/.