June 5th, 2008
I bought a camera I researched through and through.
It’s a canon powershot s70.
I fired up gphoto2 but got this error:
[root@localhost caps_canon]# gphoto2 -P
*** Error ***
An error occurred in the io-library ('Could not lock the device'): Camera is already in use.
*** Error (-60: 'Could not lock the device') ***
So.. what’s up??
After much pain.. I tried running udevsettle as root.. and voila.. it works.
gphoto2 -P
update
No, it doesn’t work. It was a freak incident, that it did.
Boy oh boy.. this is troubleshome. After MUCH reading, I think it’s a udev permissions problem.
Messed with /etc/udev/rules.d/ files and hmm…. it’s iffy.
More to come…
Posted in posix | No Comments »
April 20th, 2008
I look up things on cpan pretty often. I seem to be using firefox a lot. So.. I would like to have a dropdown entry to CPAN in the search plugins toolbox.
Doing so is pretty easy.
Look for your firefox installation searchplugins dir.. it may be something like /usr/lib/firefox-2.0.0.12/searchplugins
Place this file (CPAN.xml) in /usr/lib/firefox-2.0.0.12/searchplugins/CPAN.xml and restart firefox.
Posted in posix | No Comments »
April 1st, 2008

I’ve been reading Hackers and Painters. Amazing.
This guy Paul Graham has some inspiring ideas about the computer industry and the future of code.
Incredible reading material.
Some of the things that stand out for me- so far..
Software is moving away from the Desktop, to the server.
It’s becoming less relevant to code in the fashion of the day languages.. It will become more acceptable to choose a language by its usefulness to the project at hand instead of for portability and miscellaneous reasons.
A way to make money with software is to offer services online. Forget distribution.
When a project is assigned value (sponsored by a parent company), the count of users is a worthy meter.
Languages that will evolve and survive will likely do so for convenience, not speed.
The speed of processors is exponentially evolving, (see moore’s law). It will be more useful to save the programmer time then to save computer time.
Valuable languages are python, perl, ruby.. High level languages.
Graham makes a compelling sell for Lisp. Personally, I’m sold- that this is the next language I will become profficient in.
What should you work on?
Pick a hard problem that affects many people. Offer ways to solve it. It can be a hack at first- get the damn thing running. Don’t take shortcuts, solve things the right way- use your judgement.
Work yourself to the bone. After that comes the soul.
Oh, and.. fuck microsoft. Did I mention that?
Paul Graham worked on Viaweb, which was one f the first 3 online applications online (browser independent, and nothing to install). Yahoo bought this ecommerce tool a long time ago.
He’s also responsible for something called the Bayesian spam filtering method.
Paul Graham is an incredible inspirational figure. His writing makes me feel like taking on the problems of the world and kissing babies.
I see a parallel between him and Richard Stallman. Who by the way- touts Lisp as the preferred language of the GNU.
Posted in posix | No Comments »
March 25th, 2008
There really are a ton of messy ways to tinker with adding runmodes to CGI::Application.
I tried a lot of different things, succesfully, strangely, even ‘cleverly’.
If you have a plugin that is being ‘use’d, you should have an import function.
Read the rest of this entry »
Posted in perl | No Comments »
March 21st, 2008
Do programmers have feelings?
Do we have normal human emotions?
Do we give birth, do we love, care, feel sadness, joy… Do we? I don’t know. I feel sad right now. It’s Friday and I feel sadness with a smoke between me index and middle finger on my right hand as I type.
Does that mean I am no good as a coder?
I don’t know.
–
Looking back I have to guess.. Sure. Developers have feelings too. Even posix h4×0r5.
I’m glad that’s over and Now I can get back to thinking of something else. Life’s short and there’s a lot of people to help out. Gotta get your ass out of your head and open your eyes wider.
Entropy’s such a bitch.
Sooner or later she’ll catch you with a butcher knife behind your back and teach you who’s your momma.
But until then..
Posted in near life experience | No Comments »
February 12th, 2008
I tried out the WordPress module by Sebastian Enger to post to wordpress blogs.
The module is missing a lot of things- it won’t pass tests, and it’s lacking in options- all it does is post. I am writing a set of tools/packages for interacting with a wordpress blog.
I have isolated all relevant the xmlrpc calls for the wordpress application in this module, WordPress::XMLRPC. This module can be used standalone. WordPress::XMLRPC lets you post, download, query, etc etc. I think people familiar with WordPress will be very happy to have a perl interface to the xmlrpc calls (I am!).
WordPress::XMLRPC
Posted in Uncategorized | No Comments »
February 6th, 2008
I wanted to cut a chunk of footage from a video file.
Mencoder does this wonderfully, but, the command is not intuitive.
First, the example. This command goes to 10 minutes after the movie starts and takes 30 seconds after and spits out to ‘out.avi’..
mencoder ./filein.avi -ss 00:10:00 -endpos 00:00:30 -o ./out.avi
More practical example:
Fire up a terminal emulator.. open your source movie with mplayer.
You’ll need to see where in the movie you are, press ‘o’, get a pen and paper. This tells you the time elapsed.
You want to start your video selection at 00:14:24, that is, 14 minutes, 24 seconds.
And you want to stop at 00:15:24.
What you need to figure out is how much time there is betwen the start time and the stop time, in this case, one minute.
So our -ss seek/start time, will be 00:14:24
Once the movie is being copied, the end position (inside the copy movie) will be 00:01:00 (one minute).
Let’s put the command together..
mencoder ./in.avi -ss 00:14:24 -endpos 00:01:00 -o ./out.avi
Wait! Where is the stop time of 00:15:24?? RTFM, remember? endpos is telling mencoder where to stop, this is the target duration of the output movie we are making.
Posted in cool linux commands, posix | No Comments »
January 30th, 2008
Sometimes I have a divx file that is way too big to fit into a cd.
How the heck do you make an avi smaller?
I ripped a copy from dvd to an avi, and got it to under 700 megs, great. That fits in a cd. But then I had a 10 meg subtitle file! So, it didn’t fit! I needed to get the avi a little smaller.
If you look up info on mplayer, mencoder.. there’s a LOT to read.
So here’s how, in no way complete.
Just one way to solve the problem.
mencoder in.avi -o out.avi -ovc lavc -oac copy -lavcopts vbitrate=400:vpass=1
Now, what’s very cool about mencoder, is it gives you stats on progress..
Pos: 101.5s 2435f ( 0%) 213.30fps Trem: 27min 628mb A-V:0.036 [320:32]
‘Trem’ is rime remaining, and the mb count is the guess for how big it will be.
As the progress gets further along (beyond 10%), the stats will be more precise.
Posted in cool linux commands, posix | 1 Comment »
January 29th, 2008
This is the “Tao te ching”. It is a collection of 81 “poems” that make up a philosophy.
The Tao was written by Lao Tzu.
There are many translations of the Tao. Here is the version that I prefer. It was made by a
scholar named Wing Tsit Chan.
The version is not easily found, the book is out of print.
Thus, when I found it again, I placed it here so that others looking for the Wing Tsit Chan Translation of the Tao may have an easier time finding it.
tao te ching translated by wing tsit chan
Posted in near life experience | No Comments »
January 29th, 2008
I code for a living. I need a lot of text on two screens at all times.
I need the best monitor possible so that my eyes will not burn out and I won’t be able to keep working.
If the company I work for did not buy me the hardware I need, I would go out and buy it myself.
I am a recent convert to lcd screens.
There are a couple of peculiarities about the ViewSonic VA903b that I have learned and want to share.
I have two of these, and for a little while I wanted to chuck them out with the bath water.
Two things that could be happening with the VA903b to give you a moire effect, a blurry image:
1) If you see ghosting of light letters on a dark background: check the cable on the back of the monitor, make sure it is plugged in properly.
Wiggle it a bit, and the ghosting dissappears. If the cable is too tight from being far from the computer, your image is bad.
2) Check the horizontal size of your screen. I noticed that the auto adjust does not automatically adjust the horizontonal size of the screen.
I also noticed that there is a sweet spot just under the total number of cells on the screen. This setting is *more* important then the “fine tune”
option on the “manual adjust” menu.
Having figured those two things out, I love my monitors way past my old CRTs. I don’t know that I could ever use a CRT again.
Posted in Uncategorized | No Comments »