Tag Archives: vim

OpenIndiana Jones

So, after a bunch of research about building a DIY NAS, I decided to buy a whole bunch of hardware to do so. But, the real question was which software to use. FreeNAS seems to be the most popular solution, and I heard it was better than something called OpenFiler. Then I stumbled across NexentaStor, which is free for any NAS less than 18TB in size, which is fine for me. I was basically ready to go with that, but then I heard about OpenIndiana and the napp-it web gui. Basically, OpenIndiana is the result of OpenSolaris getting closed by Oracle. Since Oracle shut down the openness, the last open version of the operating system has been “sporked” into OpenIndiana. I just installed it in a VM, and I’m impressed, especially with the pool management of zfs.

But, being a hardcore Linux user for about 8 years, I’ve gotten used to certain things working a certain way. This post is just a little note to myself, and to others potentially, about what I didn’t like about the base install, and how I fixed it.


So, nicely, the machine comes with vim 7.2 installed, which is fantastic.  The problem is it’s in compatible mode by default.  Gotta shut that down.  Solaris apparently keeps the vimrc file hidden away in /usr, so we have to do this:

echo "set nocompatible" | sudo tee -a /usr/share/vim/vimrc

I also added the following lines for good measure to the same file using vim:

syntax on
set bg=dark
set ts=4
set sw=4

Now I have a real working copy of my favorite editor. That’s more than half-way to happiness for me. More to come.

Update: grep

So, now that I’m getting settled, I’ve been doing a bunch of shell work, and there’s something I noticed:

root@nyu:/etc # grep -R 2,2 *
grep: illegal option -- R 
Usage: grep -hblcnsviw pattern file . . .

That’s right – the default grep is crappy Solaris grep, not good old GNU grep! So, I checked it out, and the way to solve this is to use ggrep, which I will alias to grep, of course.

root@nyu:/etc # alias grep="ggrep"
root@nyu:/etc # grep 
Usage: ggrep [OPTION]... PATTERN [FILE]...
Try `ggrep --help' for more information.

Using Vimpress

I’m regaining some functionality I haven’t had for a long time today. Back in the old days, I used to use [Flog](http://www.ralree.com/2006/09/02/changing-up-the-flogging/”) to post to Typo, but that all went away with Mephisto (I couldn’t get XMLRPC to work properly). So, I’m trying [Vimpress](http://friggeri.net/blog/2007/07/13/vimpress). Hopefully, I won’t need to hack together Ultimate Tag Warrior into WordPress 2.8 to get tagging from vim to work.

It looks like it’s working, as a matter of fact. I installed the [Markdown for WordPress and bbpress](http://mitcho.com/code/) plugin, and immediately my post was fixed up with nice new syntax. Tags work without any additional plugins using WordPress 2.8. Go Vimpress!

##Update 2
As you can probably see on the sidebar, I added a vimpress repository to GitHub, since it was lacking one before. You can now use vimpress simply by performing a git clone git://github.com/hank/vimpress.git .vim. I went ahead and patched it with the custom slug options mentioned in the main vimpress site’s comments. Both versions are available as [tags on GitHub](http://github.com/hank/vimpress/downloads).

##Update 3
I happened to get to wonder how secure XML-RPC was, so I did a nice little wireshark packet capture, and lo-and-behold, there was my password in plaintext HTTP. I was aghast – why couldn’t they do a little HTTP-Digest authentication or something at least? Anyway, after researching what people think of this, and finding only past vulnerabilities in WordPress, not complaints that it’s just a **bad idea to use insecure XML-RPC for blog posting**, I tried putting an s in front of my HTTP. Guess what – ***It Worked!*** I have to give props to Python for having that all built in.

So now, thanks to Site5’s free-to-use server certificates, I can now use XML-RPC securely.