Archive for the ‘Tips’ Category.

Vim encryption , encrypting with vim and blowfish.

I am always on the search for the other ways to encrypt my documents on a server.
I’ve used gpg keys, gpg symetric encryption, but this one seems to fit the bill the best.
Encrypting with vim is a very painless process, it does take some setup, but not much, I promise.

The first thing I do is to setup an alias in my .bashrc file.  I alias the following :

alias vime=”vim -u ~/.vimencrypt -x″

vime is short for “vim encrypted”, at least in my head wink
WHEW! Step one finished, that was easy! ……hey, where is that “easy button” again ?

Next is to edit/and or/create a separate .vimrc just for this, and I name mine  .vimencrypt
This file will be in your home directory.  ~/.vimencrypt     
It contains the following:

source ~/.vimrc 
set nobackup 
set noswapfile 
set nowritebackup 
set cm=blowfish

Note: Since Vim 7.3 (2010-08-15)(and newer), vim can now use Blowfish encryption.
If your using an older vim — remove the “set cm=blowfish” line. It will then default to crypt for encryption.

I know, very complicated right ?  wink   That’s it folks, you are now READY to use encryption with vim!
Now, simply type “vime something.txt”  and you’re on your way.

You will then see:

Enter encryption key:

Enter same key again:

If you entered the same key twice, then you should be presented with a normal vim interface.

If you use “vime” to encrypt the document the first time, it will stay encrypted.
You can then just use vim normally to edit it endlessly (vim will ask for your password, you only have to use “vime” on the initial creation of the document), and it’s encrypted when you close it.

Now you will see VimCrypt~02……. when you cat your encrypted file, and it’s encrypted with blowfish, a MUCH MUCH stronger encryption than just “crypt” which can be broken fairly easily.

> cat test VimCrypt~02!sD~wLПYEx

I hope you have fun with vim and encryption.

 

ArchLinux on VMware WorkStation on WinXP (Host)

I love my job, I really do.  However I hate that I have to run windows to administer unix/linux machines (just seem counter intuitive ya know ?).  Ah but in the corporate world, you have to bend to the will of the masters.  They are ok with running Linux in a vmware setting though (I know, I know, I know … ).  Enter vmware workstation.  I shelled out the money myself for vmware workstation so that I could run Linux on the desktop.

So far, it’s running very well…and I don’t have a powerhouse machine by todays standards by any means… only 2 gigs of ram in this machine.  For anyone thinking about running Arch on VmWare Workstation, I say go for it, it works great. The Arch Wiki has all the information you really need, albeit in perhaps a few places.   I tried various wm and desktop setups, settled with KDE.  I know, alot of the Arch peeps think “KDE” and snicker… but it works, and I have all the tools I need to get my work done :)  I’ve used Arch at home for about 5 years now, on servers and in a business enviroment.  I love using Arch with vmware center, in a server capacity. vmware center makes it simple to clone servers and with a few scripts, it’s great. Taking snapshots before “updating” makes updates painless and worry free, vmware workstation offers that same feature.  Cost for Vmware Workstation, $139.

Obligatory link: http://store.vmware.com/store/vmware/en_US/DisplayProductDetailsPage/ThemeID.2485600/productID.221027300/?SRC=EM_11Q3_CHRISTMASINJULY_WK_BUY&elq=e39f3a6b9a594c4ab6dc019650eda9fa   CODE: PREHOLSALE  Good through midnight Aug 4th.

My setup has dual monitors, and I have Archlinux spanning both monitors full screened, now, I can just pretend that M$ OS doesn’t really run on my machine… hey, I’m not proud.  :D

TIP: Ever get those strange characters in your console ?

Ever get those strange looking little buggers in your console after installing Arch and firing up the terminal ?
Something like this –
[crouse@archie ~]$ pstree
init─┬─6*[agetty]
├─crond
├─httpd───11*[httpd]
├─mysqld_safe───mysqld───9*[{mysqld}]
├─sshd─┬─sshd───sshd───bash───su───bash
│ └─sshd───sshd───bash───pstree
├─syslog-ng───syslog-ng
├─udevd───udevd
└─vmtoolsd

Simply add the following to your .bashrc and close your terminal window and open it up again, or source the .bashrc file again.
export LC_ALL=C

[crouse@archie ~]$ pstree
init-+-6*[agetty]
|-crond
|-httpd---11*[httpd]
|-mysqld_safe---mysqld---9*[{mysqld}]
|-sshd-+-sshd---sshd---bash---su---bash
| `-sshd---sshd---bash---pstree
|-syslog-ng---syslog-ng
|-udevd---udevd
`-vmtoolsd
[crouse@archie ~]$

Getting a listing of blogs on Archlinux.me

An easy way to get a listing of all the current blogs in the system.

[crouse@archie ~]$ cat archme.sh
#!/bin/bash
dbase=`mysql -u USERNAME -pPASSWORD -e"use wordpress; select path from wp_blogs;"`
for data in $dbase ;
do
echo "http://archlinux.me${data}"
done
[crouse@archie ~]$ ./archme.sh  | grep -v http://archlinux.mepath | sort
http://archlinux.me/
http://archlinux.me/anikom15/
http://archlinux.me/anubis2591/
http://archlinux.me/aymara/
http://archlinux.me/bionicapple/
http://archlinux.me/brain0/
http://archlinux.me/crouse/
http://archlinux.me/cyrusm/
http://archlinux.me/dickturpin/
http://archlinux.me/drcouzelis/
http://archlinux.me/dusty/
http://archlinux.me/edgar/
http://archlinux.me/emallson/
http://archlinux.me/fallenwizard/
http://archlinux.me/gnuisancev3/
http://archlinux.me/hatten/
http://archlinux.me/heleos/
http://archlinux.me/itsbrad212/
http://archlinux.me/jada/
http://archlinux.me/jbsnake/
http://archlinux.me/jdarnold/
http://archlinux.me/jimi/
http://archlinux.me/jp/
http://archlinux.me/kaptenen/
http://archlinux.me/kcirick/
http://archlinux.me/killerturtle/
http://archlinux.me/kittykatt/
http://archlinux.me/lordmetroid/
http://archlinux.me/msx/
http://archlinux.me/nblock/
http://archlinux.me/neonskull/
http://archlinux.me/panuh/
http://archlinux.me/peasantoid/
http://archlinux.me/platinummonkey/
http://archlinux.me/procyon/
http://archlinux.me/requiem/
http://archlinux.me/ronald/
http://archlinux.me/shadowtracer/
http://archlinux.me/shemz/
http://archlinux.me/staerseus/
http://archlinux.me/sudobash/
http://archlinux.me/tajidinabd/
http://archlinux.me/theisz/
http://archlinux.me/theringmaster/
http://archlinux.me/usedtire/
http://archlinux.me/wonder/