A piggy bank of commands, fixes, succinct reviews, some mini articles and technical opinions from a (mostly) Perl developer.

wget through a proxy

Edit /etc/wgetrc or ~/.wgetrc

Add these lines:

https_proxy = http://username:password@host:port/
http_proxy = http://username:password@host:port/
ftp_proxy = http://username:password@host:port/

Vim experiment: Disable arrow keys


" EXPERIMENTAL

" Disable the arrow keys so you're forced to use h,j,k,l
" and other key bindings and will therefore be more productive
" an experiment

"  inoremap  <Up>     <NOP>
"  inoremap  <Down>   <NOP>
"  inoremap  <Left>   <NOP>
"  inoremap  <Right>  <NOP>
"  noremap   <Up>     <NOP>
"  noremap   <Down>   <NOP>
"  noremap   <Left>   <NOP>
"  noremap   <Right>  <NOP>

" cf the default statusline: %<%f\ %h%m%r%=%-14.(%l,%c%V%)\ %P
" format markers:
"   %< truncation point
"   %n buffer number
"   %f relative path to file
"   %m modified flag [+] (modified), [-] (unmodifiable) or nothing
"   %r readonly flag [RO]
"   %y filetype [ruby]
"   %= split point for left and right justification
"   %-35. width specification
"   %l current line number
"   %L number of lines in buffer
"   %c current column number
"   %V current virtual column number (-n), if different from %c
"   %P percentage through buffer
"   %) end of width specification
"set statusline=%<\ %n:%f\ %m%r%y%=%-35.(line:\ %l\ of\ %L,\ col:\ %c%V\ (%P)%)

Virtual machines on linux

VirtualBox OSE
  • Free
  • Works
  • Have to shut VM down to change any settings
  • Command line access to read settings:
    • VBoxManage list vms
    • VBoxManage showvminfo [vm name]
  • Can use NAT and port forwarding to access locally when on wifi
  • Embiggening a disk is tedious
VMWare
  • Very big and heavy
  • Client is free
  • Software to create VMs is paid