excess.org

Ian Ward

Consulting
Boxkite Inc.
Software
CKAN contributor/tech lead
PyRF primary contributor
Urwid author
Speedometer author

Presentations
Contributing to Open Source
IASA E-Summit, 2014-05-16
Urwid Applications
2012-11-14
Urwid Intro
2012-01-22
Unfortunate Python
2011-12-19
Django 1.1
2009-05-16

Writing
Moving to Python 3
2011-02-17
Article Tags

Home

Ian Ward's email:
first name at this domain

wardi on OFTC, freenode and github

Locations of visitors to this page

Articles Tagged “Linux” rss icon

Super Meat Boy
Super Meat Boy with Reconfigured Keys link
Posted on 2011-12-20.

The Humble Indie Bundle #4 was nice enough to bring Super Meat Boy and a bunch of other great games to Linux. The SMB people however seem to want to punish you for playing on a keyboard and leave you with SPACE as jump, SHIFT as run, and no way to reconfigure the keys.

Here is a little xmodmap script that makes playing on a keyboard much more enjoyable:

keysym x = space
keysym z = Shift_L

Just save this as xmodmap.meat and then run xmodmap -pke > xmodmap.orig to save your original key settings.

Finally, run xmodmap xmodmap.meat before starting the game, and xmodmap xmodmap.orig when you're done.

Tags: Software Linux


Speedometer 2.8 Released link
Posted on 2011-12-08.

This release adds the long-requested linear scale feature to Speedometer. You can now also adjust the minimum and maximum values displayed, and switch all units shown to bits per second.

Tags: Urwid Software Speedometer Linux


Recording Both Sides of a Call link
Posted on 2011-06-23.

I set up a VM to present software to a client remotely, but I needed a way to record both the audio in and out so that I could capture both my presentation and the client's questions. In the past I've used some ALSA configuration magic for audio things advanced enough that they don't have a friendly GUI, but since Pulse Audio is the shiny new thing I decided to go that route.

It turns out to be fairly simple. I create a new null sink (think: fake sound card for output) and attach a loopback from the audio out monitor of the "real" sound card and another from the the audio in of the "real" sound card:

pactl load-module module-null-sink sink_name=bothsides
pactl load-module module-loopback latency_msec=5 sink=bothsides \
      source=alsa_output.pci-0000_00_04.0.analog-stereo.monitor
pactl load-module module-loopback latency_msec=5 sink=bothsides

The alsa_output... source comes from running pactl list and copying the device name. The second loopback automatically uses the only alsa_input... source device. Then I can record from the monitor of this null sink with a command like:

pacat --record -d 2 | sox -t raw -r 44100 -s -L -b 16 -c2 - "recording.wav"

The -d 2 option selects the new null sink monitor device I created (the index may be different in your case). Last, you may want to use the pavucontrol program to adjust the levels for the input and output so you don't end up with one sounding much louder than the other in the combined recording.

Tags: Software Linux


Python 3 Argument Sketch Slide
Python 3 Argument Sketch Slides link
Posted on 2011-06-14.

Here are the slides from my Python talk at OLS this afternoon.

Tags: Ottawa OLS Software Linux Python


Python 2 and 3 Slides link
Posted on 2011-05-19, last modified 2011-05-23.

Catching up on some more old business: here are the slides from the Python 2 and Python 3 talk I gave at last month's OCLUG meeting.

I am also preparing some Python tutorials for the upcoming 2011 Linux Symposium in Ottawa June 13-15. Hope you can make it.

Tags: Ottawa OCLUG OLS Software Linux Python


Python logo
Python Talk at OCLUG on Tuesday link
Posted on 2011-04-03.

I will be giving a talk on Python 2 and Python 3 at the Ottawa Canada Linux Users Group meeting on Tuesday. Hope to see you there.

Tags: Ottawa OCLUG Software Linux Python


Posted on 2010-11-29.

Many hard drives available today have 4K physical sectors instead of the old standard 512-byte sectors. The larger sectors allow the manufacturers to save space required for error correction, so they can save money, and in turn we get cheaper hard drives. Which is great, except that if a drive is using 4K sectors the drive must report it to the operating system or performance may suffer.

I recently purchased two WD HDDs: one 1.5TB and one 2TB, both "EARS" models. The 1.5TB drive happily reports that it has 4K physical sectors:

fdisk -l /dev/sdc
Disk /dev/sdc: 1500.3 GB, 1500301910016 bytes
...
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes

But the 2TB drive claimed to have 512 byte sectors.

fdisk -l /dev/sdd
Disk /dev/sdd: 2000.4 GB, 2000398934016 bytes
...
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

"That's strange", I thought. So I ran a quick test to see if the 2TB drive was lying.

Read More …

Tags: Hardware Linux


Good Linux Games link
Posted on 2010-10-07.

LWN.net just published an article listing some good Linux games (comments possibly even better than the article). I'm posting this here so I can find it again when I have the time to waste.

Tags: Software Linux LWN.net Games


Urwid at OSCON and LinuxFest Northwest link
Posted on 2010-04-04.

Rob Lanphier will be giving talks relating to Urwid at OSCON and LinuxFest Northwest:

LinuxFest Northwest
Bellingham, WA, April 24-25 (Exact time TBD)
Using Urwid and Python Console Applications

O'Reilly's Open Source Convention (OSCON)
Portland, OR, July 22 (Thursday, 1:40pm)
Great User Interfaces in the Terminal Window

Tags: Urwid Software Linux Python


Crystalfontz preview
Posted on 2010-03-14.

The development version of Urwid now has support for display and input on a Crystalfontz 635 LCD panel. These are small LCD screens that fit in a PC's 5ΒΌ" drive bay. They have six buttons, four red/green LEDs and a 20x4 character display with an adjustable backlight.

Read More …

Tags: Urwid Hardware Software Linux Python


« page 1 2 3 page »