paxed: It's a Hand! (Default)
Sunday, December 16th, 2012 08:14 pm
Whoa, has it been this long already? Anyway...

Assume you have an ncurses program that is used remotely (either via telnet or ssh) and it resides in a chroot. The program (of course) needs terminfo files inside the chroot.

Usually, ncurses mode is started with:

initscr();


But what happens when user uses some strange terminal (for which you have no terminfo file for) to connect? The program will show a black screen or quit, because initscr fails.

Use newterm instead:

if (newterm(NULL, stdout, stdin) == NULL) {
if (newterm(DEFAULT_TERM, stdout, stdin) == NULL) {
/* Die! */
}
setenv("TERM", DEFAULT_TERM, 1);
}


Just #define DEFAULT_TERM "xterm" or whatever you want to use and have terminfo file for. The setenv is optional, but good if you plan on exec'ing other programs.
paxed: It's a Hand! (Default)
Thursday, May 26th, 2011 05:30 pm
Sometimes Firefox can corrupt the visited places history database, or places.sqlite. This is a simple way to get almost all of those back:

First, close Firefox, and go to the profile dir, like ~/.mozilla/firefox/xxxxxxxx.slt.
Check that you have places.sqlite, and you should have the old database file as places.sqlite.corrupt. Then do the following:


strings places.sqlite.corrupt | grep ^http | cut -d'"' -f 1 | cut -d"'" -f 1 | sort | uniq | sed -e 's/^/insert into moz_places (url) values("/g' -e 's/$/");/g' | sqlite3 places.sqlite
Tags:
paxed: It's a Hand! (Default)
Saturday, April 9th, 2011 02:58 pm
a script for volume adjustment, with on-screen display. Uses aumix and xosd.


#!/bin/sh
aumix -v"$1"
DAT=`aumix -q | head -1 | awk '// { print $2 }' | sed -e 's/,//'`
osd_cat -b percentage -p middle -A center -d 1 -P "$DAT"
Tags:
paxed: It's a Hand! (Default)
Saturday, March 26th, 2011 02:35 pm
It's time to do another list of books I've read recently, or at least since the last such post:


  • Weston, Robert Paul - Dust City: YA, Fantasy. Fairy tale, in a gritty modern(ish) setting. Not one of those urban fantasies with sexy elves, but a real fairy tale, with nods to several Grimm tales. 3/5
  • Bear, Greg - Hull Zero Three: SciFi. Enjoyable, but not the best of Bear. 3/5
  • Wells, Martha - The Cloud Roads: Fantasy. Interesting world she's got there... 4/5
  • Adams, Cat - Blood Singer-series: Urban fantasy. Felt like a guilty pleasure, this. Reminded me a lot about L. K. Hamilton's Anita Blake -books, before she went all porny. 3/5
  • Fforde, Jasper - The Last Dragonslayer: Fantasy in a modern (not our) world setting. Was left feeling a bit unfulfilled after reading it, I was expecting a bit more from Fforde, really. 3/5.
  • Pratchett, Terry - I Shall Wear Midnight: The 4th book in the Tiffany Aching series. 4/5 (Though I couldn't help but feeling this book was a bit lackluster when it came to the monster...)
  • Tidhar, Lavie - The Bookman: Fantasy/SciFi, set in alternate history Victorian London, with mythical overtones. Quite excellent. 4/5
  • Elliott, Kate - Cold Magic: Fantasy/SciFi. Whereas Tidhar's book felt like alternate history, this one felt more like set in another planet. Very interesting, ice-age Victorian world. First in series, so no satisfying ending though. 4/5
  • Kadrey, Richard - Sandman Slim: Urban Fantasy. Not the Elves-type, but Hell-and-Heaven-and-magick stuff. First in series. 4/5
  • Walton, Jo - Among Others: Modern Fantasy. Excellent, in a quiet way. 5/5
  • Banks, Iain - Surface Detail: SciFi. Culture-series. 5/5
  • Weeks, Brent - The Black Prism: Epic Fantasy. Interesting magic system. First in series, so again, no satisfying ending. 4/5
  • Bradley, Rebecca - Lady in Gil: Fantasy. First book in the trilogy. Quite good. 4/5
  • Bear, Elizabeth - Bone and Jewel Creatures: Fantasy. As good as I've come to expect from Bear. 4/5
  • Kowal, Mary Robinette - Shades of Milk and Honey: Fantasy, Jane Austen -style. Excellent, quiet fantasy, though I wasn't quite satisfied with the end, but it was more or less like how Jane Austen would've done it. Worth reading, definitely. 4/5
  • de Bodard, Aliette - Servant of the Underworld: Fantasy, set in the Aztec Empire. Interesting setting, but something didn't quite click for me. Could've been excellent, now just good. Still giving it 4/5
Tags:
paxed: It's a Hand! (Default)
Sunday, December 26th, 2010 07:51 pm

  • Goldfrapp - Head First: Pretty good, in a vaguely 80s way, though it probably works best as background music.
  • Goldfrapp - Supernature: More "modern" sounding than Head First, but I can't say which of the Goldfrapp albums I like more...
  • Joan Osborne - Little Wild One: For some reason, this album felt a bit religious to me. Good, though.
  • Kids of 88 - Sugarpills: Perhaps a bit too noisy(?), but not a bad album.
  • The Green Children - Encounter: Weirdly, I like this when listening, but immediately forget about it.
  • Morcheeba - Blood Like Lemonade: Stealth album, I didn't even know they'd had another one out. Like this, but it does sound a bit similar to the other Morcheeba albums.


I'm trying to avoid buying total crap, that's why no real negatives here. OTOH, there wasn't anything really remarkable here either...
Tags:
paxed: It's a Hand! (Default)
Monday, August 30th, 2010 03:53 pm
Massive Attack - Heligoland: Not recommended. The tracks are indifferentiated mush; I couldn't even tell when one ended and another started. Some small glimpses that might've turned into Protection or Teardrop -like brilliance, but those sunk into the murk.

mind.in.a.box - Crossroads: Commodore 64 goodness, but none of the tracks really stood out, nor approached the earwormy poppiness of I Love 64 or 8 Bits off of their Retro-album.

Janelle Monáe - The ArchAndroid: Some of the tracks are a bit too experimental for my tastes, but on the whole, this is still very, very good. My favorites are Faster, Cold War and Wondaland.
paxed: It's a Hand! (Default)
Saturday, August 7th, 2010 08:15 pm
Recently read:


  • Terry Pratchett - Nation: Excellent. In tone this was closer to the Amazing Maurice, than the Discworld stuff. Almost got teary eyed at some parts. 4/5
  • Dru Pagliassotti - Clockwork Heart: Steampunk. Somewhat predictable, but the setting was pretty nice. 3/5
  • Alaya Johnson - Moonshine: Set in 1920s. Contains traces of non-sparkly vampires and other assorted creatures. Also somewhat predictable, but still a goodish read. 3/5
  • Steve White - Saint Antony's Fire: Scifi Alt history, set in 17th century. Okayish. 3/5
  • Brenda Clough - Revise the World: Scifi, Timetravel. Not too bad, and main character was nicely and believably done. 3/5
  • Diana Wynne Jones - Hexwood: Fantasy/Scifi. Excellent. Reminded me a lot of Mythago Wood by Robert Holdstock. 4/5
  • A. Lee Martinez - Divine Misfortune: Comedic Fantasy set in modern times. Fun, but nothing extraordinary. 3/5
  • R. Scott Bakker - The Judging Eye: Epic Fantasy, first book in the series. This is off to a good start, if you like 'em epic... 4/5
Tags:
paxed: It's a Hand! (Default)
Monday, July 26th, 2010 05:29 pm
Quick Ropecon 2010 synopsis:



  • I only took about half a dozen photos. It seemed like I'd already seen everything in previous 'cons.
  • Couple people asked about the horns I wore. (Yes, they're real horns) I think they will/have become "my" costume at the 'con.
  • Stayed up the saturday-sunday night. (2-3am was the worst, nearly all of the gang I know went to sleep)
  • Didn't go see any lectures or such. (Apart from a 5 minute quick peek at Realities of Steel by Guy Windsor)
  • The German GOH, Friedemann Friese, wandered around the boardgame area, looking a bit lost/bored/something. No-one was playing his games?
  • Played

    • Modern Art (Still good though I suck at it)
    • Summoner Wars (Sorta like fantasy chess and CCG bastard. Multiplayer was too slow)
    • Rush'n'Crush (Futuristic car driving. Might be worth checking out more thoroughly, but hard for a first-timer to pick up)
    • Guillotine (Fun, at least during the coma hours. Easy to pick up)
    • The Great Dalmuti (I'm not that good at it, but it's still fun. Except when the cards are all scuzzy because they've been used for two days straight and you're the slave who needs to shuffle and deal the cards.)
    • Dixit (Guess the correct surreal image. Fun and easy)
    • Bang! (specifically, Bang: The Bullet -set. Fun, but I have hard time remembering the symbols.)
    • Cutthroat Caverns (Fun, but hard. And needs more different monsters.)



I gave up on the 'con a bit early on sunday (around noon), because monday means work. I slept a bit (and badly) on the train back home, but I'm still going to crash'n'burn now.

Addendum: Dixit & links.
Addendum 2: Bang
Addendum 3: Forgot Cutthroat Caverns. That should be all.
Tags:
paxed: It's a Hand! (Default)
Sunday, June 20th, 2010 09:19 pm
Recently read books, not in any order:

  • Ian Tregillis - Bitter Seeds: Worked for me, though the German language felt a bit strange. A linguist friend took one look and decided against the book. There's a short story online set in the same universe at tor.com.
  • Robin Wasserman - Skinned: Pretty good (for a YA), actually.
  • Skyler White - And Falling, Fly: Lost me at the supernatural "hotel" in Ireland. Blah.
  • Greg van Eekhout - Norse Code: Started, but for some reason, it didn't catch me. Might try again later.
  • Kelly McCullough - SpellCrash: Liking the Ravirn series, and this too was pretty nice.
  • Anna Katherine - Salt and Silver: This was fun "romcom", but nothing too deep. Liked the language, for some reason, but the authors are ex-Tor editors or something...
  • N. K. Jemisin - Hundred Thousand Kingdoms: Excellent, definitely recommended.
  • Greg Egan - Diaspora: Standard Egan, with dozen extraneous technological ideas per page. Readable, but didn't feel it was as good as Permutation City.
  • Carrie Vaughn - Voices of Dragons: YA. Lost me at the dragons hiding underground. It's not the 1930s anymore...
Tags:
paxed: Cartoon cat's purrin' (hurrutihurr)
Wednesday, May 5th, 2010 11:09 pm
I've been trying out CHDK now that I've got a Canon digital camera (PowerShot SX200 IS) that can run it. What geek could resist something that makes the camera fully scriptable!

But, I couldn't get it to work. I couldn't even find the "firmware update" option in any menu on the camera. The wiki says to put the camera into playback mode and then press the menu-button and there should be an option to update the firmware... but no.

Until I tried it without turning the camera on.
paxed: It's a Hand! (Default)
Monday, April 12th, 2010 10:46 pm
Dear small bands: You don't want my money, do you? If you really, truly do: make it easy for me to give my money to you.

I was listening to SlayRadio, and they played a song by mind.in.a.box. I wanted to buy their R.E.T.R.O. album, but I'd like to get the MP3s only, not the physical CD. Checking their site, I can see where to get them.

Which is a big fat FAIL.


  • Musicload.de - Fail on several levels: It's German only, for Germans (and Swiss and Austrians) only.
  • iTunes? I don't have iTunes. Nor Mac, nor a "PC" as it says on the itunes site.


I heard on IRC that they're also on Spotify. Which is Yet Another Fail: Free only if you have invites. ...Now who I know who might have invites...?

Oh, oops. My urge to spend the money passed.
So, Sorry mind.in.a.box: No money for you, I got annoyed enough.

One place that Does Things Right is C64audio.com; You buy the CD, and get to download the MP3s immediately. Or buy the MP3s (or FLACs even!) only.
Tags:
paxed: It's a Hand! (Default)
Saturday, January 2nd, 2010 08:18 pm
Really, people.
Seems like every damn game I'd like to try is Windows only.

The rest seem to be flash games (and flash sucks on linux, but that's not the game author's fault)

The biggest exceptions?
Tags:
paxed: It's a Hand! (Default)
Wednesday, December 23rd, 2009 06:01 pm
Just to remind myself, here's the recipe for simple salsa:


  • crushed tomatoes
  • onion
  • jalapeno
  • garlic
  • coriander leaves (aka cilantro)
  • black pepper
  • oregano


Chop up an onion, the jalapenos and the garlic gloves. Add the spices (coriander leaves, black pepper and oregano). Add the crushed tomato sauce. Mix well. Put into a container and keep in the fridge overnight.
Tags:
paxed: It's a Hand! (Default)
Friday, July 10th, 2009 10:42 pm
New hobby: Kayaking.

I did the basic kayaking course few weeks ago while on holiday, and now I've joined the local kayaking club. Last tuesday was the first kayaking trip here. Up the river, as it was too windy to go to the lake; the city looks slightly different when viewed from there...
paxed: It's a Hand! (Default)
Saturday, May 23rd, 2009 01:06 pm
I got a bicycle last wednesday. Been biking about 25km a day since then, and have been adding lots of new roads to OSM. I think I'm getting used to it already: no more sore ass!
paxed: It's a Hand! (Default)
Thursday, May 7th, 2009 05:20 pm
Thank you so very much, TP-Link. Your clueless engineers have apparently decided the geeks don't have enough work, so installing one of your wireless NICs really should do something else too... oh, like maybe break something totally unrelated in Windows in some mysterious way?

Don't install TP-Link's TL-WN353G or similar if you want to use the parallel port under Windows.
paxed: It's a Hand! (Default)
Saturday, April 25th, 2009 04:13 pm
Perl CPAN FAQ says:

How do I install Perl modules?

Installing a new module can be as simple as typing perl -MCPAN -e 'install Chocolate::Belgian'.


I assume they're not actually lying about it, but in my experience it doesn't work. Perl goes "Mwahahah! You need [this module]? It requires [these modules], one of which I will now FAIL!"
paxed: It's a Hand! (Default)
Saturday, April 11th, 2009 12:09 pm
Don't order from dvdsource.co.uk; it took them only 15 days to dispatch the item after receiving payment.
paxed: It's a Hand! (Default)
Tuesday, April 7th, 2009 06:26 pm
I just ordered a T-shirt with a custom NetHackish image on the back. Took me quite a while to find a place on-line that does short runs of black shirts with print on the back. Now I'll be ready for RopeCon!
paxed: It's a Hand! (Default)
Tuesday, February 17th, 2009 05:35 pm
So I went and bought World of Goo last friday, now that there's a native linux version... and finished it last night. Pretty quick, but oh so nice... Though I had to skip some of the levels, because they are INSANELY HARD AND EFFIN IMPOSSIBLE! *grumpf*
Tags: