I'm trying out tumblr and wrote a post over there about my beef with zsh. Check it out: http://cyberrodent.tumblr.com/
zsh is cool and all, and lots of people seem to really like it. I have one main beef with it over bash and its something that I use multiple times a day. This would't be such a big deal if so many people say that zsh had better completion.
my beef is about getting the last argument to the previous command. Say you want to check that a file is there and of an appropriate type, you'd use the file command like so:
file /path/to/some/file/buried/on/your/file/system
if that works out, then you want to, for example, edit it.
vim /path/to/some/file/buried/on/your/file/system
You don't want to type the whole thing again so you use a modern shell shortcut to save some typing.
in zsh you have to type your command, let's say 'vim' and then !$ and then press enter to see your command filled out and then press enter again to run it. (4 key strokes besides my command)
in bash, all I have to do is type my command 'vim' and then 'escape' then '.' and my last parameter pops up on the line. I hit enter to run the command. (2 key strokes besides my command).
to my mind, the bash way seems easier. Maybe its an obscure bash trick so people think zsh is better cause they don't even know you can do that in bash. dunno.
what do you think? got any better tricks or killer reasons to use zsh?
cyberRodent
cause there's alot of stuff to remember
Saturday, February 25, 2012
Tuesday, February 21, 2012
Quick fix for low latency ssh to my ubuntu box
I have ubuntu running on an old T60 Thinkpad at home. I've noticed that there is a serious lag when ssh-ing to that machine on my local network. For a while I wrote this off since it was an older and slower servers (dual 1.6ghz Centrino 2gigs of RAM) but after trying to work over ssh for I while I got so frustrated by the slow response to typing commands that I decided to google around to see what could be done about this. This turns out to have been a great thing to have looked into as I ended up with over all improved latency to my server which means typing is now responsive enough to not get frustrated.
I had noticed that traceroutes to the ubuntu box were very varied, from fractions of a ms up to nearly 1000 ms (wired 100 baseT ethernet). I tried to tweak some stuff on the router but traceroute to other hosts were all nice and low so I thought this must be something with the TCP settings on the ubuntu host.
I had noticed that traceroutes to the ubuntu box were very varied, from fractions of a ms up to nearly 1000 ms (wired 100 baseT ethernet). I tried to tweak some stuff on the router but traceroute to other hosts were all nice and low so I thought this must be something with the TCP settings on the ubuntu host.
Friday, September 23, 2011
Sharding a Database: Collected Readings
I need to learn a lot about database sharding so I'm collecting here a bunch of things to read. Once I read them hopefully I'll come back and comment on them as well.
Friday, August 26, 2011
Jenkins
Labels:
ci,
jenkins,
monitoring
I recently started tinkering with Jenkins CI - its designed for use as a continuous integration system but also can be used to monitor external cron jobs. At work we've got lots of cron jobs that keep things moving and prior to life with Jenkins we would just get a ton of emails with the status of those jobs. Invariably those emails beget an inbox rule which shuttles all those emails into a folder that would occasionally get read, or deleted.
Saturday, August 13, 2011
PHPUnit and SugarCRM
I recently had to write up a script to do some automated processing on our SugarCRM Opportunities and I took it as an opportunity (pun intended) to write up some PHPUnit Tests for my code.
There are some challenges in working with SugarCRM if you are trying to get it do other things than just be a web-based CRM. To be able to run scripts using SugarCRM's API you need to deal with a few things: Sugar's use of globals, setting include paths. For testing you'll also need to change your configuration to connect to a test database.
Subscribe to:
Posts (Atom)