Monday, February 29, 2016

Razor Scooter Repair


P: Tight steering on this otherwise great scooter.
R: The two 36mm nuts are tightened down to the long 4" collar: the piece the logo sticker in the photo below.
F: They should be tightened against each other, just a fraction of a mm above the collar, allowing it to turn freely. (This requires two large adjustable wrenches to do properly)

Monday, January 23, 2012

KDE Kate Save All

This is kind of awesome. Like the old Apollo OS, whose windows could be completely controlled by the commandline. Like a modern haiku:


qdbus | grep kate | while read k; do qdbus $k | grep save_all | while read i; do qdbus $k $i trigger; done; done

Sunday, October 24, 2010

Baby coming

Any day now. I'm not going to go to the John Stewart's rally, as it comes too close to the due date, and wife wants me close. Hmm, everyone here is going, Columbia U will have no students this weekend. A great counterpoint to the partisan-ness this country has been facing in the last 15 years, but I wonder how many of the attendees have actually *talked* to a republican about their concerns.

So I'll watch it on some big screen around here in NYC. Also I've swung back to liking my websites to reside in my living room. Please see my family blog, run from a small Dell Studio Hybrid (wonderful machine) running Linux in my custom-made mahogany cabinet, which I made last year. I snobbily call it our credenza.

Wednesday, July 28, 2010

Unconscious in professional life

Just a short post about how I realize my unconscious brain has input in my professional life, specifically when coding or doing complex operations. Just now I was doing a big upgrade of the scheduling system for our Anton supercomputers, and in step 20 of about 50 steps or so my conscious brain says to do something else that I had forgot, that was not done correctly the first time, something that might bite me if not fixed. A nagging unconscious voice says no, what you're doing is not needed. Be careful, look around. Like the room got darker, slightly, without any change to the light. The problem is the unconscious voice is non-verbal for me, so I only get a binary-like yes/no signal from it. And sure enough, when I looked around it had actually been done correctly (by me, but some time ago). The thing I was about to embark on would have been redundant, and could interfere with the old way, causing confusion.

It would have been clearer if the unconscious brain verbalized this, but I'm glad to have the binary signal anyways. I wonder if others have observed anything like this.

Friday, June 11, 2010

Democracy Kernel

(From a discussion with a Moroccan cab driver, from sing sing to home.) What makes a democracy? In this country we are beginning to discover it is not simple. Its not the name, not the style of election, i.e. you can have both, Iraq, but still not have what we would consider a stable, vital democracy. A democracy in spirit. Cab driver: You know Egypt? They have a president, but he never steps down! Yes that can happen, and often. The king-rule is stable, and dies hard. Morocco has a king by name.

So what is a democracy? As far as I can tell, it is based, like many stable things that are complex, on a contradiction. The government must be afraid of the people. By 'people' I mean interests represented by the people, be it corporations, organizations, interest groups, or the body politic. Specifically not the government itself. The government must feel fear of these entities, feel they can be exposed by them, and then overturned by them. Only then will the government perform as the people expect. Even in the US there is corruption, greed, injustice (God knows), and dishonesty. However not as much as could be imagined for such a rich country (for now). Why? Because politicians will be dishonest, will steal, but only to a threshold where they are unlikely to get caught. If they exceed it, the press will find out, and we love a scandal. Scandals are what we feed upon, and feel righteous by. Blagojevich has not chance. He was found, beyond the reasonable doubt of most, to take bribes and we will take no quarter. The Americans will have his blood, figuratively, and not feel bad about it. It doesn't take more than "blag" in my search bar to get the auto-complete on his name.

The stable democratic government fears the people. Where is the contradiction? Why wouldn't a government, in charge of so much, make itself powerful enough to not fear the people? This has happened countless times, in countless countries. My father seemingly reports it monthly in Africa, but it is almost everywhere. How do you instill something different, the fear? Is it Guns to the people, i.e. the second amendment, or is it something that has to be won after decades of enslavement and oppression? The fledgling US experienced the latter, and agreed to award the former. I now arrive to a grey area; the objective is clear but the mechanism is not.

Friday, May 7, 2010

One second rule - stock market

The slope of the large drop on the stock market yesterday afternoon is insanity. In my mind there is no question it was not caused by Greece, or the US worker's productivity, or any rational concern. It was pure automated trading, similar models operating in very tight loops, selling in unison. Several blue chip stock's value went to 0, trading at less than a penny.

If I were congress I would enact a simple rule: anyone who buys a stock must hold it for at least one second. This would reduce the systematic danger by making such a high slope impossible.

-- Update Feb16.
Ha, look where I work. I guess another answer is automated trading is so effective and cheap and beneficial in reducing spreads for consumers that it is here to stay. So like early automobiles that were dangerous at first, we work to make them safer. I have read a few analysis of the flash crash, and no longer think HF trading was the predominant cause, nor the one-second rule an effective fix. (Although I'll offer no proof or evidence here).

Saturday, May 1, 2010

Setting X resolution the new way

I am spending some time trying to tweak my XBMC setup on Fedora 12 linux on a cute little Dell Studio Hybrid computer. One problem is my HDMI output has to go through a Sony HT-CT500 video receiver, so we can press "DVD" on the remote and switch from the Cable DVR box to the linux computer screen. Purely convenience, but the details in life are important.

This leads to the problem that the Sony video receiver clips the HDMI signal, even in its passthrough mode. Not great, why did the engineers not test it better? 1024x768 resolution is impossible, the LCD TV just goes blank. Could it be the TV or the HDMI cable? No, when I plug in the Linux box directly using the HDMI cable, it displays that resolution fine. Linux dutifully searches for an appropriate resolution on KDE startup and chose 640x480, but I think I can do better. Perhaps a shortsighted goal, but I can be an explorer, and am in such a mood now.

Ok, so how to determine what the exact limits of the Sony video passthrough is? Use the nifty new xrandr tool on Linux's X server. There is no longer an xorg.conf it seems, and good riddance.

Here is a little script that allows me to do a parameter sweep quickly. It is influenced by others, namely http://compbrain.net/archives/tag/xrandr. So far I have got 736x500 to work.

[xbmc@shitzu bin]$ cat try-new-res
#!/bin/bash
#
# Try different screen resolutions
#
# FDS 2010


set -x 

if (( $# != 2 ))
then
        echo "Give me two ints: horizontal vertical resolution"
        exit 1
fi
c=$(cvt -r $1 $2 | tail -1 | sed -e 's/Modeline//')
if ! xrandr --newmode $c
then
        echo "Too bad"
        exit 2
fi
name=$(echo $c | awk '{print $1}')
xrandr --addmode HDMI1 $name
xrandr --output HDMI1 --mode $name