Git stashing, and why you do it too much

First of all, this workflow depends entirely on an (rarely un)spoken rule in my repositories- if it’s in the wip/ or trash/ tree, don’t touch it. I’m planning on rebasing with impunity.
I stash a lot at work, especially when I shouldn’t.

Generally, stashing occurs when I’m working on something that’s not ready for production or even feature complete enough to warrant publishing, and I need to rebase or start on something else. Nearly always I stash it and forget about it (even though my prompt yells at me when I have stashes)

The alternative is to check it into a wip/ or trash/ branch (depending on how confident I feel about the change in question being a Good Idea). This is useful for a stack of reasons:

  1. It preserves some history about the idea (what else I was doing at the same time)
  2. It makes tracking what you’re doing a lot simpler (because the stash stack is a pain at the best of times)
  3. Most importantly, you can keep branching

The last one is the most relevant, a stash isn’t rooted to any particular point on the tree which means if you make an invasive change you’re going to struggle (which is a pain when the patch in question alters some core behaviour and was only barely working to start with)

If I know it’s going to be a problem that I take a lot of stabs at I’ll generally make it a branch like wip/ideas/short_description_of_approach for simplicity to begin with; and this will only get better in git 1.7.9 which adds a description attribute for branches.

Stashes are awesome for getting a clean tree so you can rebase or do some non-trivial merging, but for keeping ideas straight it’s a pain; to the point where I’m considering a hook to delete my stashes after a week so that I can just be rid of them.

Posted in Articles | Tagged , , , | 2 Comments

Convert iterm color file to Xdefaults

My favourite colorscheme for vim (Jellybeans.vim recently had a pull request submitted including a colorscheme for iTerm2, a terminal emulator for OSX.

Not wanting to go back to OSX after finally getting my encryption key back and being back in linux, I set about converting it to RGB values that urxvt can understand.

I realised two things while doing this-

1. plists are flaming piles of horror. Someone at Apple took bad acid.
2. Ruby is cool for bashing up quick scripts.

The results are up on github as itermcolors2xdefaults and it seems to work reasonably well.

The scheme in question was very feint so I added an option to multiply all the colors, but by and large it does what it says on the tin.

Posted in Articles | Tagged , , | Leave a comment

~/.subversion in svn

I have to do this way more often than I’d like, my home directory lives in svn, and my svn config comprises part of my home directory. The upshot is that subversion likes to make blank data if none already exists, and then falls in a heap if the path it’s trying to create is already there.

This gets worse if you already have config you like and goes totally sideways if you actually depend upon some of it to get a clean checkout.

The solutions isn’t complex- but isn’t obvious either. Most solutions I’ve seen involved invoking svn, then trying to throw it in the background after it creates metadata but BEFORE it begins creating files, and then nuke the files. Kludgy at best- I much prefer this approach.

cd ~
mv .subversion _subversion
svn --config-dir _subversion up
echo "You must now merge _subversion into .subversion"

Posted in Guides, Hax | Tagged , , | Leave a comment

psych0tik domains are moving

As part of our general hatred of SOPA, psych0tik has made a few changes to our infrastructure.

Initially, was configured as a mirror domain for; as it is controlled outside the US it is further seperated from their draconian infrastructure and policy making, and in the event of things going sour should allow us to stay reachable while we sort things out and keep you posted.

The second change is moving registrars. Previously we had been with godaddy, but in light of godaddy’s support of SOPA (Good explanation here) we have migrated to I recommend that any of you with domains registered at godaddy do the same.

The final point is that while the domain transfer should be seemless, there could potentially be a hickup. In that event that this happens, we’ll keep our twitter account @psych0tiknet updated.

Posted in psych0tik News | Tagged , , , , | 5 Comments

psyCA Certificate Authority Management

We use Certificate Authorities indirectly every day while checking webmail and giving minimal thought to the authenticity of the page we’re reading from. Moxie Marlinspike talked about the flaws in the current trust in root CAs at BlackHat USA 2011. While flawed, certificate authorities can still be incredibly useful on a private level. Certificates can be used to authenticate users to VPNs, sign emails between users and organizations using s/MIME, enhance/substitute for password logins on websites, amongst other uses.

In my frustration while attempting to create and manage CAs for some of the above mentioned purposes I decided to fork and enhance the script that openSSL ships with. I am currently working on fixing bugs, adding better error checking, extra features, and better usability. I have dubbed the fork psyCA and has no dependencies except for OpenSSL and a POSIX shell.

Installation: installing the script consists of cloning the git repository

git clone git://
chmod +x psyCA/

If you would like to contribute changes to the script or the default openssl.cnf please fork our repository and send us pull requests if you’re a GitHub user or email your patches to me or the psych0tik-list mailing list if you’re not a GitHub user.

Posted in psych0tik News, psych0tik software | Leave a comment

New box: Juggernaut

I’ve been working on getting Juggernaut up and running for a couple weeks now and have promised a few people pictures and a summary of what’s going on… so here we have it.

I was lucky enough to be given the majority of the hardware by a coworker who had recently upgraded.  This started me out with the case and motherboard, along with 6 Gigs of ram, a Core2Duo @3.00Ghz, and dual nVidia GeForce 9500 GTs. I had to ditch the IDE CD/DVD drive and use a SATA device, as I’ve only got 1 IDE bus to work with.  The motherboard has 7 SATA slots, so I’ve been stuffing as much SATA into the machine as I could.

For storage, I went a little overboard.  As the primary drive, Juggernaut uses a 40G IDE drive.  On top of that he’s got another 41G IDE (a slave to the former), a 500G internal SATA drive (salvaged from a laptop), a 3T external USB drive, a 300G external firewire drive, a 80G external USB drive and finally a 3.5″ floppy drive.  I’m still looking at getting something to support SD cards, so that this box can interface with pretty much any media around.  The 41G IDE slave also contains a Windows ME install that will try to boot, but fails horribly.

On top of the usual compute-y  things, I’ve also added a few unique input sources in the form of a USB attached tempurature, humidity and pressure sensor (USB-THB) and a RS232 attached (via a USB converter) 270 degree dome security camera.  Both of these were designed by Z.Monkey.

Finally hooked this all up to my KVM to run through my old CRT and purchased a new router (Buffalo makes a nice one that comes stock with ddwrt.)  I’ve installed the AMD64 build of Gentoo and have all the peripherals (minus the security camera) working.

Straight down into the case.

One of the graphics cards

Both graphics cards attached

Side view with camera

Side view of the external storage cluster

Front view.  The small SATA drive is mounted to the DVD drive with duct tape.  You can also see the floppy drive and one of the internal IDE drives.

Security camera mounted to the control board (courtesy of Z.Monkey)

Close up on the control circuit

USBTHB, also courtesy of Z.Monkey

Finished setup, with the security camera on top and the USBTHB on the wall

Routers, including the new Buffalo router with ddwrt

KVM, as well as Storm and the UPS

Posted in Articles, Hax | Tagged , , , , , , , , , | Leave a comment