Here’s the situation: say you are at a friend’s place and as all responsible hosts, they have a password protected wifi network. Your friend is busy (or unavailable) so you can’t ask her for the password. Of course, you are known to not give up easily. You look around and realize: aha! someone else over there on the couch is busy with their laptop, so they must know the password. Unfortunately, they don’t. But the password must be somewhere on their laptop, since they are connected after all. So how do you find it?
OK, that probably sounds contrived. But the truth is that I did have the need to extract the wifi password from my wife’s laptop earlier today and thought I’d share the (pretty simple) process.
Step one: open keychain access
Step two: search for the network name (SSID)
Step three: check ‘Show password’ (you may need to enter your password first since this required Administrator privileges).
NOTE: This post is not about the editor war — so please don’t try to start one either.
I use vim as my editor of choice. As I note above, to each his own editor.
However, Vim is not what one would call a “sexy editor”. After all, it has been around (in some shape or form) since before I was born. It does not generate as much buzz in the blogosphere and is not the darling of all the new kids on the block, as some of the other editors out there. Not many Ruby on Rails developers, for instance, seem to be using Vim for coding (actually, saying that a lot of RoR developers seem to be using Textmate is probably more accurate, but you get the point). It is written in C and does not use git for hosting. The Vim website leaves much to be desired. In the social networking world, Vim barely has a presence.
But, I contend that Vim still has a lot to offer. Here are few of the things you can check out to spruce up your Vim usage:
I’m also very happy to see the number of Vim related repositories on github. Bottomline: don’t give up on Vim. Vim is still sexy baby, you just need to look in the right places :)
Update: I’m including a screenshot of Xoria below.
I used to run Compiz with KDE 3.5 and I quite liked that setup. Compiz was fast, highly (a bit too much, perhaps) configurable, and came with a great set of plugins. One of my favorite plugins was the screenshot plugin — basically it allowed me to capture arbitrary regions of the screen with a simple mouse+keyboard combo. This was particular useful when writing blogposts to demonstrate something on the desktop, when filing bug reports (to visually show what was going wrong), when telling webmasters what was wrong with their website (it makes everyone’s life easier if the screenshot only captures the problematic space on the page, not the entire window) and so on. The key strength of the plugin was that it was so easy to invoke, and the captured regions automatically got saved as PNGs to a pre-determined folder. Neat.
Unfortunately, with KDE4, I am no longer running Compiz since kwin (KDE’s native window manager) has built-in support for compositing now. KDE4 is great (especially with 4.2) but I still missed the screenshot plugin very much. I couldn’t find any equivalent plugins for KDE4, so I was on the lookout for a workaround. It turns out, there is one. Here is what you do:
- Go into System Settings -> Input Actions
- Create a new global shortcut (right click)
- Bind a convenient shortcut — I use Super+S or Meta+S
- For the command/URL, enter ‘kbackgroundsnapshot –region’ without the quotes, of course
And there you go — now you can simply press Super+S anywhere, anytime and the mouse cursor will change to a cross-bar. Once you have selected the region to capture, hit enter to save the picture, escape to cancel the action. By default the pictures are saved to your Desktop folder, and are named ‘snapshotX.png’ where X is some number. Here’s a screenshot that I just took:
What makes this work is the little-less known program (like so many other hidden gems in KDE) ‘kbackgroundsnapshot’. It is essentially ksnapshot, but it is supposed to run in the “background”, meaning that it doesn’t show the regular dialog box that ksnapshot shows. Useful for scripts and such.