Archive for the ‘My Life’ Category

New shell trick

A new trick for for your shell kung-foolery quiver. I use ZSH so the exact syntax won’t work for other shells. I use Maven to compile my projects, and ZSH is obsessive about trying to correct my ‘mvn’ command to ‘mv’. I get the options [No|Yes|Abort|Edit], well there needs to be a STFU option in my opinion. Well short of that you can use this little trick to shut ZSH up about a command its ignorant of.

Just set an alias in your .zshrc file like this:

alias mvn='nocorrect mvn'

, ,

No Comments


PlayonLinux FTW!

This is just cool. I was messing around trying to get an old Windows game to work with Wine on Linux. I wasn’t making a lot of progress, I kept having to start the setup, crash, tweak something in Wineconfig, try setup again, crash, tweak something more. Finally the game installed, but then I had issues playing it. More tweaking Wine. Well, I think you can see where this is going.

Most of the information I was getting on tweaking Wine was from the winehq.com forum. For the most part the advice was good but there was a learning curve to figure out what the people were talking about when they say you need to use certain libraries, and override this or that and install this from winetricks. Anyway, the whole process was long, convoluted, and error prone. Then someone mentioned playonlinux. I had never heard of this, so being the naturally curious person I am I Google it and found their website. Hmm, it looks like simple wrapper script for Wine. WTH, I will give it a try and see if it simplifies my life at all.

I added the Ubu repo’s and installed it. So far so good. I found my game in the list and hit ‘install.’ Wow, the installer went without a hitch, that was easy. There is no way the game is just going to work, after-all, I couldn’t get it running under vanilla Wine. So I double clicked the icon it put on the desktop and..it crashed.. heh, of course.. Not being the most intelligent person on the planet, I thought I would just give it another try. Double click, and… it worked. I was on the main screen, well… there is no way the game is going to work. So I hit play..and..I..can’t..believe..it, it worked..and it worked really well. I bumped the resolution up to native res for my LCD, and…that worked too!

So there you go. PlayOnLinux.com. Check it out, it works for more than just games too.

, , , ,

No Comments


How to do less

The title is a little misleading, but appropriate for the subject. I am a huge user of ‘less’ to view logs files. While most of the users in my office are chemically addicted to ‘tail -f’. They just can’t seem to wrap their heads around the idea of a basic text viewer that can tail (follow), search, mark, and insert line numbers if you want. If you want a full run-down on what you can do with less go here: http://linuxaria.com/howto/bash-linux-less?lang=en. It pretty much outlines all the really useful options for less.

If you aren’t using less, you should be.

No Comments


Rooted my droid

So I couldn’t resist the temptation to root my droid any longer. I have been running the stock ROM since I first got it around Christmas ’09. I was perfectly content to just use what was given to me on my phone, besides, with what I was paying Verizon, I didn’t want to chance bricking the phone and be left with an early term fee or having to buy a new phone.

So there I sat for 14 months content with mediocrity. Then I read this article on Lifehacker and my curiosity overwhelmed my better judgement. To say that the stock ROM on my droid was running slow was..to say, rather an understatement. I am not sure if I had installed too much stuff, or there were too many background programs running, all I knew is it routinely took more than 45 seconds when I switched from an application back to the desktop for me to be able to see the desktop icons…definitely not within my realm of patience.

So I took the dive and first rooted my phone with the SuperOneClick. I DID have to reboot into Windows for this, because the program only ran there and Wine couldn’t find my phone (again, fears of bricking made me err on side of caution). After NOT click the ‘Install Drivers’ button and spending a good 20 minute refusing to read the instructions, I realized my error and before I knew it SuperOneClick had rooter my phone.

Next I rebooted and installed ClockworkMom ROM manager. I downloaded the most recent MIUI zip and transferred it to the SD card. Selected the zip file in ROM Manger and rebooted. After a lengthy back-up of the stock ROM and install of the new MIUI ROM, it was done.

A couple of things I noticed immediately that were probably obvious to more experience rooters.. not sure what to call them. First off, HOLY JUMPING JELLY BEANS, this thing is screaming fast! Faster than I ever remember the stock ROM being, and the user interactions are really snappy. I spent a good 5 minutes just flipping between screen to watch how quick everything was, score.

Second, even though I backed up all my application settings with Titanium backup pro, and I reinstalled some of my original applications (installing a new ROM means re-installing all your apps again, FYI :-0 ) I couldn’t restore my previous settings, bummer, looks like I will have to redo all those Angry Birds levels.

Third, this should really be the default GUI for droid, it looks incredible, everything si extremely well polished, usually there are little things that escaped the programmers but I have only found 1 very minor graphical oops. No kidding, this ROM is really good looking, usage of transparencies and gradients really sets this apart.

I highly recommend people give MIUI a try, especially those with pokey first gen Droids that are waiting for their contracts to be up so they can get some new hotness of a phone (*cough Atrix *cough)

, , ,

1 Comment


Robbinsweb lives…again

Yeah, ok, so I know I already wrote about this, but the ole’ boy died again. This time I lost a drive. For once in my life i was glad I had mirrored drives on a home server. The down time was rather epic considering my complete lack of motivation to rebuild it, and its difficult to find an 80 GB drive any more. For the interested here are the steps I followed to restore the array:

1) Install the drive in place of the dead drive (like I needed to tell you that)

2) Boot the degraded array and go start up fdisk indicating the new drive (something to the effect of ‘fdisk /dev/sdb’) The reason I used fdisk rather than the far sexier cfdisk, is that cfdisk was having fits about the drive having an incorrect block count or something that made no sense on a new drive. Fdisk handled it perfectly.

3) Partition the drive EXACTLY like the current drive (size, order on disk, etc.)

4) Add the partitions back into the array one by one. So if you have three partitions in the array, say root, swap and home as sdb1, sdb2, and sdb3 respectively, add them into the array like this:

mdadm –add /dev/md0 /dev/sdb1
mdadm –add /dev/md1 /dev/sdb2
mdadm –add /dev/md2 /dev/sdb3

That is assuming your array partitions line up to your disk partitions that way.. Then you can watch the rsync updating the partitions by doing a ‘cat /proc/mdstat’

, ,

No Comments


First full week (5 days) of bike commuting

Today marked the first full 5 days span of workdays that I have commuted to work via bike. I just beat the rain again today, last week I wasn’t so successful. I hit the hardest rain half way to work and vice-versa on the way home. I got soaked, and so did my bag, I am just glad I didn’t decide to pack my laptop.

I have been using a tiny Jansport biking bag to carry all my stuff to and from work, but I am finding it extremely tight to fit everything. I have been reading reviews and looking for a good biking pack that would 1) Fit everything I wanted to carry [laptop,work clothes,lunch,small woodland creatures]; 2) Be weather/water-proof since I am continually getting caught in the rain. After looking and reading reviews, this is the bag I decided to order. I will write a mini-review when I get it.

, ,

No Comments


To alias or not to alias, that is the question

I have a good number of servers I have to keep track of at work, and they all have rather long domain names, and I really haven’t gotten used to the subnetting at my job yet. So what is one to do? Well, I did what any concerned Linux user would do, I aliased all of then in my hosts file. Sort of like this:

192.168.125.133 dev1
192.168.125.137 dev2
10.6.8.201     uat1
10.6.8.202     uat2

I can hear you say already, “Jeff, just memorize them, there are only 4!”, yeah, ok, this is only about 1/16 of the aliases I have, so that becomes a bit more difficult. So here is my conundrum, do I continue with the aliases, or do I go cold-turkey and try to memorize them. The upside of aliasing is that I can fly when I am at my machine, its a no brainer to scp or ssh to a machine, but then I look like a total retard when I am at someone else’s computer, “What do you mean you don’t know the IP or domain name of your dev server!?”.

So therein lies the subject of my pondering..

, ,

No Comments


A solution of sorts

A reoccurring issue with web development has always been cross-browser checking. Does the site work and layout correctly in Firefox, Internet Explorer, Chrome, Safari, Opera, blah blah. A huge problem with doing all my development on Linux is that I can’t easily check Internet Explorer on Windows. Most of the rest of my team also decline to use Windows and most of them use Apple (a whole other debate, but I will skip that for now). Our clients are totally Window’s shops so this presents a problem. We have tried running VM’s locally, but this has its own issues such as resource usage on your local machine. You start up a VM and watch all your RAM go bye bye.

The solution I have for this now, which seems to work alright, is to run another box with a decent amount of RAM and let everyone RDP into it for testing. This coupled with the virtual machines that Microsoft provides for testing has been working very well.

, , ,

No Comments


Techno ducky!

If you know me you probably know that I like me some techno when I code. I dunno why, guilty pleasure I suppose, sort of like how I like to listen to hardcore when I drive. Yeah…don’t ask, I don’t have an answer for you.

Anyway, I like to listen to something on my headphones when I code since I am able to narrow down the number of distractions that way and really concentrate on what I am doing. Which is odd, its like I need one distraction rather than a bunch since I am able to ignore one thing as opposed to multiple. Anyway, again, I heard Ducktoy by Hampenberg, and had to laugh. They/he/she, bases a techno soung around a duck toy squeaker. Its annoying at first, but gets kinda catchy, then become annoying again. I found this YouTube music video for the song, not sure i like the idea of bikini clad women dancing in unison whilst squeezing duck toys, that is sure to give me some funky mental images in the days to come. Oh man, I have had too much coffee today..

, , ,

1 Comment


Do you ever get the feeling?

I have been working to implement a Google custom search engine into a clients website. I have had to pour through the documentation to fully understand how it works and I am both impressed and revolted simultaneously. I keep getting the feeling that this stuff was originally developed by people that are obscenely smarter than I am. Its obviously brilliant, but like any brilliance, its usually offset by some other glaring omission.

First off, the search API from Google. Why is the primary search API deprecated and the recommended replacement not even out of labs yet? So let me get this straight, I can either use the API that will EOL’d at some unknown time by Google without warning, or I can use the unstable labs API that could and most likely will change in the future. Sounds like a call from the client complaining that their site is broken just waiting to happen.

Second, the API is written in a way that leaves massive holes of undocumented functionality. Usually when you document an API you include ALL the functionality so people can fully utilize all the features. So I am continually finding blogs and other bastions of literary excellence revealing ‘hidden’ features of the Google search API. I have implemented a fair amount of the code I have found on these sites and I am still flabbergasted as to why Google would just leave this stuff out of their documentation.

I am going to be writing up an article on implementing a Google custom search engine over the next few days, one, so I can remember if I have to do it again in the future, good documentation is sparse on this subject, and two so others can refer to it and hopefully avoid some of the frustration I have gone through to get this to work.

, , ,

No Comments