Saturday, November 16, 2013

X paste buffer analogue in Windows

There is a very great app over at that actually makes X style select paste possible. The most annoying thing is, that it only works in focused input windows. I have also played with which is actually even better but this unfortunately has the same problems as the non delaying focus switch. If it weren't for the wireless lan I'd even be willing to accept that.

Thursday, November 7, 2013

Focus follows mouse under Windows

Back to Windows, many more tweaks coming I fear. Let's start with Focus follows mouse. There is an accessibility setting in the control panel but it also raises the window. If you don't want this, use regedit, navigate to HKEY_CURRENT_USER\Control Panel\Desktop and add 0x1 to the key UserPreferencesMask (0x41 would be FFM with raising). Documentation can be found at technet. In order to be able to use this (yes it's unusable that way), add another dword-key called ActiveWndTrkTimeout that has the timeout in miliseconds. There are a lot of guides that call it ActiveWndTrackTimeout or ActiveWindowTrackTimeout, both of which don't do anything!

Wednesday, October 23, 2013

Oh happy day - Biblatex with Polyglossia is nigh

A couple of days ago the fine folks over at biblatex finally fixed bug #69, which is about the usage of biblatex with polyglossia instead of bable. This means I have lost the last excuse to use babel with lualatex and can finally start into the bright future ahead without that crappy package. I was reminded of how bad it is when I put together a list of common errors we see in #latex on freenode related to babel. Well at least now I personally won't have to touch it again. Burn Babel Burn. Good Riddance!

Installation is easy and risk free if you do it in texmf-local. Worked great for me.

Latex is actually getting cleaner code wise with all these modern packages like fontspec, biblatex+biber, polyglossia, glossaries+xindy,

Wednesday, October 9, 2013

ZSH Functional Programming Tools

Today I learned that you can have not only map and filter but also other functional programming constructs in plain zsh. zsh has outdone itself again, just ridiculous. Having functional tools seems to have become something like second order turing completeness in that it gives you a notion of productivity as to what can be accomplished.

Saturday, August 10, 2013

Fonts with latex - the whole scoop

This is so buried inside of other unhelpful questions that it took a long time of determined searching to find, but it's the definite guide. The only thing it lacks is that you can find the font family names under linux with
fc-list :outline -f "%{family}\n"

Thursday, June 20, 2013

Debugging a zsh startup script

I had a weird problem during startup of new shells. Usually when I don't have a clue, why something works one way or another (or doesn't) I start strace -f and have a look at the syscalls. Now when you try that on a shell, that doesn't really give you what you are looking for, which is kind of obvious if you think what a shell does and how it works. Now what? You have two simple options: set -x or setopt XTRACE VERBOSE (alternatively start with zsh -xv); both did the trick for me.

Monday, March 11, 2013

mac forensics

I was just trying to get some scripts out of my old macbook air install. Back when it broke I took a snapshot of the disk with dd and now had the image lying around.

What I usually do (and tried is something like this:)
  • Have a look with fdisk -l into the image where the partitions are (fdisk -l img)
  • Take the offset of the partition I want, multiply by the block size and use that to mount it, e.g. 
    mount -t hfsplus -o ro,loop,offset=209736192 mbabackup /mnt
Now that didn't work out for two reasons, first it's a gpt table so fdisk is of no help. parted knows about them but I found no way to get the exact number, so in the end I used mmls (sleuthkit). Using the offset i found there I got this error:

mount: wrong fs type, bad option, bad superblock on /dev/loop1,
       missing codepage or helper program, or other error
       In some cases useful info is found in syslog - try
       dmesg | tail  or so

This apparently is a bug in the hfs(plus) driver, since the exact same approach works with everything else.
In comes kpartx:

kpartx -l img
  shows us the table of partitions (-g for force gpt if in doubt)
kpartx -av img
creates new loop block devices which you can then just mount
mount -o ro -v /dev/mapper/loop1p2 /mnt/
That's actually a lot easier than before, great.

Monday, February 18, 2013

Visualizing Dimens in Latex Documents

Rule based typesetting like LaTeX (or CSS for the matter) uses lots and lots of lengths that can be adjusted (or adjust itself in relation to some other quantity like the font size or other length). I believe there are over ten regulating how a list is typeset alone. If you typeset for a while you'll pick up a few over time, I'd say parindent and parskip usually come first, some are so obscure you'll never need them, some shouldn't even be touched, since you risk screwing your layout in ways that you thought only MS Word is capable of. For the middle category of the ones you don't know and still want to adjust I just found a great package. The layouts package enables you to actually see how they all play together for most major latex features. This is so insanely helpful and you don't actually need the package sice everything is reprinted in the manual of course. To see how great it really is see this picture for lists.

ampersand and that

I just read a great article about the letters historically part of the english alphabet but got left out. While I knew a few already I've never heard of number 8 before and it's really interesting to know it exists. Language development is something I really should delve in some day.

Friday, January 25, 2013

NRA/Right wing crazies on Jon Stewart

Another brilliant Jon Stewart Daily Show calling out NRA bullshit. I know it's been all over the net, but the claims made are just so outrageous, it's unbelievable anyone can utter them without cracking up. Also Jon Stewart is just awesome.

Saturday, January 19, 2013

Find messages in skypes new database format

The db changed from that custom format similar to Kazaa to sqlite3, so to find stuff you now just write sql (sqlite3 flavour is a bit weird though). See this example and use .help, if you are stuck.

select author, body_xml from messages where strftime('%Y-%m-%d', timestamp, 'unixepoch') == '2013-01-18' and author == 'user';

Monday, January 14, 2013

Gnome, Ubuntu Idiocy

I just found this post on superuser and it triggered all my buttons at the same time.

It has to be the ultimate negative example. It shows what's wrong with gnome, ubuntu and superuser (I love most of the other sites from the stackoverflow family although they all have their problems, just not superuser ). This post shall remind me to stay away from these areas.

Saturday, January 5, 2013

When the \TeX gods get bored.

Every \@@par you take, \everypar you make, every risk you take, it's your own fate, TeX'll be watching you.              

Wednesday, January 2, 2013

Google firefox plugins for the ten fingered beings

Some people call me reactionary, but I don't believe in accepting progress just for the sake of it and I must say, the almighty oracle's layout and way of working used to work better for me a couple of years ago. I finally got annoyed enough by it, that i searched out a couple of plugins. I should add that i use pentadactyl, which may cause peculiar semantics, but is too good to give up.
  • The most important one is google link fixer if you just want the real URLs. I see why google wants to track, what you clicked on, but not being able to copy the link is really freaking me out.
  • Also useful in this context may be the google url shortener, since most of the time i just want to copy it into irc where the short url is even more helpful in anyway.
  • I found bread crumb navigation to really help with the URL not fully showing on the google result page. If you are also using pentadactyl you should combine this with the less chrome add on, since you likely don't have a navigation bar. Please note that in this case you need to reenable the bar and let less chrome hide it!
  • I find google customizer quite helpful, but at least at the moment you need to fudge the compatibility and disable updates for it to install and work after the first restart.This also provides a way to disable the link foo google does, if you are willing to put up with an unsupported plugin, that is partially broken or outdated, but otherwise has lots of useful features.
  • To enable mac'ish (among others of course) "Don't close window on closing last tab"(d), use
    :set! browser.tabs.closeWindowWithLastTab=false
  • In order to get back the old cache functionality without the bar use gcache+, it seems to be the most convenient plugin for this purpose albeit still annoying.