Bros!

Nov. 21st, 2014 09:01 am
elfs: (Default)
So, I'm at this café, waiting for my next meeting, and this guy next to me is hacking away at something on his IDE. It takes me a moment to realize I'm looking at something very familiar, and then I tap on his laptop. "What are you running there?" I asked.

"Oh, it's, uh, it's something called Flask."

"No, what OS?"

"Oh. It's Linux Mint."

I turned my laptop toward him. "Mint 15, MATÉ edition," I said. "Emacs and Coffeescript."

He grinned. "Cool. Cinnamon and Emacs. Don't see that much in the open, do you?" he said.

"Flask, huh? I thought I saw something that looked like Django."

"I was working on Django earlier."

We nodded to each other, secret handshake completed. Bros. We went back to hacking.
elfs: (Default)
There is no more incompetent group of boobs over at Gentoo than the LaTeX team, the team that provides the high-end typesetting software for book and magazine production. Every year, they put out a functional, working package of LaTeX that gets the job done, and every year they re-arrange the furniture, this year going so far as to get a first-tier folder in the apps manager, which they didn't have last year.

Which means every year, if I want to do advanced typesetting, I spend all day with the following: "Try to update LaTeX." Computer comes back with, "I can't, package A is marked unstable." (Everything in the LaTeX package is marked "unstable." This doesn't mean unuseable, it just means the Gentoo team doesn't have a big enough test suite to confirm it works for everyone.) I say, "Fine, package A is now marked available. Try again." Wait a while. Computer comes back, "I can't, package B is marked unavailable."

Lather, rinse, repeat. And it's not like LaTeX didn't have these packages last year; it's just that they've all been re-arranged, so the permissions markers have to be updated, by hand, one at a f'ing time, until the permissions override file has forty or fifty of these damned things. I'm up to 25 as of this morning. What a pain in the neck.
elfs: (Default)

It used to be possible for Linux users to find and save the movie file from a Flash download with earlier versions of the Flash plug-in.  Flash put the file in the /tmp directory and if you were quick you  could copy it elsewhere.  If you had a plethora of Flash files, you could often find the one you wanted with a simple ls -lt /tmp/Flash* , which sorts the files in order from newest to oldest.

The latest version of Flash does something tricky, though.  It creates a temporary file to hold the Flash object, then, while keeping the handle to the file open, immediately deletes it.  This means that the Flash application can continue to access and use the file until you navigate away from it, but it no longer shows up in directory listings.

However, if you’re really Linux savvy, there are ways around even this little annoyance.

Looking for a Flash movie you’re looking at right now?  First, run this: lsof | grep Flash .  On my computer, the output was:

midori     9206  elf   57u      REG        8,3  10012691     64772 /tmp/FlashXXKoFQgx (deleted)

There’s that noxious little “(deleted)” flag, too.  But you have a hint.  First, your process id in 9206, and the file descriptor is 57.  Now, you can just cp /proc/9206/fd/57 /home/elf/movie.flv and there you go.  File copied.  At least, it’s worked for me the few times I’ve done it recently.

Lsof is a program that lets you identify all the open resources a running program is using. In this case, my running program is midori, a Gecko-using browser with a long history of trying to keep up. By identifying the resource, I can then wander down the /proc tree, getting at the process’s available resources directly. As a user, I’m free to access (and muck up) my own resources without risking anything or anyone else on the system– Linux is good about that.

This entry was automatically cross-posted from Elf's technical journal, ElfSternberg.com
elfs: (Default)

This morning, for no reason that I’d care to discuss in public, I needed to rename every file in a directory to the index number of its position in the directory in asciibetical order, and add an extension.

The harmless version of this was:

ls | gawk 'BEGIN { c = 0; } c += 1 { print "mv", $0, c".jpg" }'

The version that actually does the work:

ls | gawk 'BEGIN { c = 0; } c += 1 { print "mv", $0, c".jpg" }' | bash

Better version (harmless):

ls | gawk '{ printf ("mv \"%s\" %02d.jpg\n", $0, NR) }'

Don’t use the second unless, well, you know, you intend on doing it.

This entry was automatically cross-posted from Elf's technical journal, ElfSternberg.com
elfs: (Default)
Average temperature running Prey with the stock Thinkpad 60: 95C.

Average temperature running Prey with the new fan and Arctic Silver on the interface: 60C.

Something was very wrong with this machine.
elfs: (Default)

I’ve been helping a close friend with her website, which is written in rails. She admits that’s a mistake, now, because it shares database tables with a PHP application, and the communication between the two has always less than stellar. I’ve been looking into her current major problem, but while I’ve been at it, I’ve been looking for easy solutions to put her back on an all-PHP track. (This seems to be the right thing to do; PHP is the only language she knows well, and the PHP component is the only thing that works reliably.)

I looked at Symfony as an easy PHP-based route off the rails.  It’s not bad, but getting it to run on my box was a nightmare. Undocumented are the number of things with which PHP must be configured to get Symfony running. For the record, to get the sandbox application to run, you need not just the stock PHP, but PHP with PDO, SimpleXML, and SQLLite. None of those are stock on Gentoo (and apparently not on Ubuntu, either).  Once I had rebuilt PHP (3 times!), it was all working.

But now it’s up and I can play with it. Oh, and I got Drupal running, but I had to use my production box to make it so. Annoying, that.

This entry was automatically cross-posted from Elf's technical journal, ElfSternberg.com
elfs: (Default)

As some of you may have heard, I recently lost my job at Isilon. In that great tradition, I have put up my resume. Have a look, and please comment on the content or presentation of either version:

Kenneth M. Sternberg, Senior Web and User Interface Developer and Designer.

There’s a copy for printing here.

This entry was automatically cross-posted from Elf's technical journal, ElfSternberg.com
elfs: (Default)
I am about as furious as one can get about a programming decision as I can get right now. For years I have used the Japanese input program canna, which has been supported GTK, and was the recommended toolkit for Gentoo.

I upgraded to the newest version of GTK last weekend and now canna doesn't work. It's "no longer supported." Great, just freakin' great. I figured I could just upgrade the Japanese input toolchain and it would work, right? No good. There are certain dependencies and they go all the way to the bottom. All the way down to glibc[?].

I have to reinstall the entire freakin' laptop. 584 programs.

Needless to say, I am not at all happy.
elfs: (Default)
This morning, my laptop had to undergo a therapeutic reboot.

On the bus, I noticed this morning that my laptop battery read 94%: 1:03, which to me was just wrong; at 94% battery I should have over two hours of performance left. Something was running away.

I pulled up the process monitor top and looked. The kernel USB hub server was the runaway, eating upto 95% of the CPU and basically eating the battery alive. This was apparently associated with my disconnecting the iPod and then suspending the laptop before the hub had a chance to register the disconnect.

A quick reboot and everything was well but, man, that's annoying. Reboot a Linux box? What is this, an abusive relationship?
elfs: (Default)
One of the problems I've had in recent years with non-anime video is that the audio and video are frequently out of sync. As the tools have improved, this has been less of a problem, but there is one cache of video out there (still accessible despite all the ill-will of Congress) that has always confounded me: the MST3K Digital Archive. Frequently, the audio would get so out of sync as to be several seconds ahead or behind the video, which is both annoying and disconcerting.

So, the solution: force the video and audio into sync by duplicating or dropping video frames as needed to guarantee a one-to-one mark of audio and video. Transcode and MkDVD don't do this, but MEncoder does, so before you pass the video to MkDVD, run it through MEncoder, thusly:

mencoder -oac copy -ovc copy -ofps 29.970 -o output.avi input.avi \
> /dev/null 2>&1


Viola'. You'll be ready to burn the results to your DVD.

Profile

elfs: (Default)
Elf Sternberg

August 2025

S M T W T F S
     12
3456789
10111213141516
17181920212223
24252627282930
31      

Syndicate

RSS Atom

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Aug. 19th, 2025 06:19 am
Powered by Dreamwidth Studios