So, I’ve been using cygwin for a while now and I am not impressed at all by the default shell for the following reasons:
1. It’s clumsy. I can’t resize properly.
2. Doesn’t take NUL character apparently
3. Backspace is acting weird so far.
4. cmd.exe looks ugly!
However, putty is pretty amazing in terms of usability. I finally found the solution with puttycyg which adds an option to run a cygwin terminal session on putty.
This might turn out to be a bit of a series. Although this is fairly useful script to have, for most purposes, you would just install one of the packages. This is useful if you’re installing a lot of packages that have some attribute common.
So, I’ve been using windows on my new Netbook. This is the first time I’ve really decided to use cygwin for day to day stuff and actually trying to make it productive is quite a work. One of the things I noticed was that the regular editors like vim and emacs had a lot of trouble adapting to cygwin. For example, backspace doesn’t work for vim and Ctrl-X, Ctrl-C combination didn’t work for emacs for me (I even double checked with google to check if my fingers lost their mojo).
I name this file np (in true Unix fashion of naming things as shortly as possible ) and place in my ~/bin for maximum adaptability.
#!/bin/bash
# Edit your cygwin files in notepad++, the best windows editor.
# Vim and emacs don't seem to work too well in cygwin.
ROOT_DIR_WINDOWS=D:\\\\cygwin
expandToWindows() {
y=`echo $1| sed -e 's/\//\\\\/g'`
echo $ROOT_DIR_WINDOWS\\$y
}
expArg=`expandToWindows $1`
echo $expArg
/cygdrive/c/Program\ Files/Notepad++/notepad++.exe $expArg
Just copy this script into your ~/bin or /usr/bin and make it executable to run as
np <file you want to edit>
So, this runs just like any other unix script. I don’t know if you can pass multiple arguments for notepad, if so feel free to extend this piece of code and give me a howler so that I can improve too.
Of course, you can do the same for any other windows application.
Here, `links` dumps the list of links that are present in the random page and I just match between [22] and [29], the name of the tip and comments and take out a few unnecessary stuff. There might be better ways to do this, but this works fine for now. Suggest some in the comments so that I can make it a little better. I can do XML parsing maybe with perl but I think it will lose some of the hackish, brutish appeal ;P.
I saw this video yesterday on geeksaresexy.net and it seemed good to share to say “good things come to those who wake up early.” Really well made animation however. The weekend’s almost over, no more sleeping until afternoon guys.
I also learned that scheduling isn’t exactly that complicated too.
I write a lot of shell, python and sometimes perl scripts to get things done and it gets somewhat mildly annoying to set them as executable every once in a while. Here’s a trick from shell-fu Tip #858
I just added the following line to my ~/.vimrc
au BufWritePost * if getline(1) =~ “^#!” | if getline(1) =~ “/bin/” | if getline(1) =~ “/usr/bin” | silent !chmod a+x <afile> | endif | endif
I have improved the script a little bit as I need to use python a lot (i.e, #!/usr/bin/env python)
If you have a better way to write the regex, comment here but I think this is good enough for most purposes.
So, I’ve been setting up the new HFOSS server dubbed gandalf (yes, from LoTR). In the process, I’ve been reading man pages every once in a while to find the intricacies of this UNIX distro and also when my tried and tested Linux commands fail me. I tell you, it’s freaking annoying when that happens. One of the annoying things with man is that by default, the pager is “more” instead of the more comfortable “less.” For some unix humor visit http://it.toolbox.com/blogs/bsd-guru/unix-humour-15908. So, less is more than more.
With Microsoft Surface, there have been various attempts to make a cheap multi touch computer using open source software. Here’s how the folks at maximum pc did it.
I just woke up with the misguided report on barrons.com titled "The Folly of Google’s Gambit." The author seems to have a misguided notion of what the status of operating system market really is. What Google is doing here isn’t making something from scratch. They’re just taking a Linux kernel and putting up a new and improved GUI layer at the top. However, what they have managed to do is, get people to show unprecedented support.
Windows generates $15 billion in annual revenue. It’s the heart and soul of Microsoft (MSFT), the centerpiece of Bill Gates’ dream to put a PC on every desktop. Other operating systems exist, but none have much traction in PCs. Apple refuses to license OSX for the PC market; Linux is a tiny player in desktops and laptops. Desktop Solaris, anyone? No thanks. Buy a PC, and what you get is a box to run Windows.
Of course, because Linux is a tiny player in the market that Google is doing this. Do you think it makes sense at all to bundle Windows 7 and slap a Google sticker on top? The applications on Linux and running Windows native applications using Wine have come a long way. Google has spent a lot of money and manpower on Wine to get applications like Picasa and Google Earth to work well. And the last time I checked, it ran Microsoft Office well enough. Of course, how much does your regular laptop user use the features of Office. Unless you have to do business accounting on Excel with macros and stuff (oh yeah, a lot of us geeks use Windows boxes at work too), you don’t really need MS Office. You can do basically all the editing and most works with OpenOffice.org without too much hassle or even Google Docs. Hell, most of my documents are on Google Docs while I move between 3/4 operating systems.
Gmail is useful but has hardly dented the combination of Outlook and Exchange. Google Apps, an early bet on cloud computing, has barely put a glove on Office.
Oh, sorry for you, looks like some big corporations are moving to Google Apps. Here’s why enterprises are moving to Google Apps. Even easier, why? It saves them money in maintenance and licensing fees. Of course, you’ll have a few MS Office packages around, for compatibility reasons. Of course, you can totally use Microsoft Outlook with Google Apps for email, contacts and Calendar. But I digress, back to the point, Evolution does talking with Exchange really well already and there are packages that can do it. If blackberry can do it, do you think Google can’t on a actual PC? Heck, they might as well implement the protocols if people want enough, err.. they’ve done that already?
OK, let’s just cut to the chase. What Linux ecosystem needs to go for a global domination is a face. To take an example of Weimar Republic, we’ve already eaten up the insides with supporters, we just need a face like Hitler to build the thousand year reich. Haha, that’s the most politically incorrect statement I can make right now. Ubuntu has already made enough dent in the desktop and netbook market that we really just need a pretty face to Linux and somewhat of a leadership on the desktop/netbook front. The reason most enterprises haven’t switched yet to Linux desktops is that they don’t have a assurance like Google’s for future dominance. And, again right now, it’s not about gaining Enterprise people right away, it’s nibbling at the home user’s craving for netbooks. As you have probably seen with the adoption of OS X in enterprise, if people use it enough for themselves, they might as well use OS X in offices.
Don’t cut Google short here. Historically, skepticism about innovations have been proven wrong time and again.
Microsoft’s task is more manageable. Search engines aren’t that sticky. Operating systems require a commitment.
The second to last line cracked me up. Sure, MS Windows is closed source and needs a lot of maintenance on Microsoft’s part but Linux is open source and Google along with a lot of people have enough expertise to solve damn near any problem. Search is still Google’s bread and butter and they’d be stupid not to support that with better algorithms and machines to crunch numbers. Having something on the web that’s hammered by a couple of million people and give results lightning fast is a huge commitment I’d say. Much more so than creating a Linux distribution.
I saw this ad while I was waiting to watch “Better off Ted” on Hulu. In general, I don’t follow up on ads or click links but this was interesting and quirky enough that I decided to follow. Kudos to the marketing folks. Apparently, it’s run by Office Depot for attracting small business owners.