vi cheatsheet

Get the PDF here.

The bare minimum vi.

How to open a new or existing file in vi

vi filename

File navigation

Use [Page Up] , [Page Down]  to page through the file. Use the arrow keys to move the cursor.

Command mode and insert mode

When you first start vi, you are in command mode

To switch to insert mode

i

Once in insert mode, you can type in your text file.

To switch from insert mode to command mode

[ESC]

Command mode

Quit without saving changes

:q!

Quit

:q

Write (save)

:w

Write a copy of the file to another name

:w filename

Search for a string (replace “search” with the string you are searching for)

:/search

Global search and replace (replace “search” and “replace” with the strings you are searching and replacing)

:%s/search/replace/

The Script Development Process

Script Development Process
Script Development Process

This script development process is an iterative process designed to help you rapidly write quality scripts. The principle is to understand and define the problem. Break up your solution into small steps. Code one small step at a time. Test each small step and get it right before moving on to the next piece. Repeat these steps until you have your solution. All while managing your time.

When is automation the solution?

The benefits of automation are primarily to save time and to decrease errors associated with manual actions. You will need to make the calculation if a script will benefit your situation. How many hours will it take for you to write these script? How many hours of manual work will the script save?

Continue reading “The Script Development Process”

Thick and Thin, Eager and Lazy: vSphere Disk Provisioning types

When adding disks to a VM in vSphere you may have seen “Disk Provisioning type” and wondered what the benefits of each type were. Disk performance and disk space used are what governs the decision to use each type.

The 3 disk provisioning types are “Thick Provision Lazy Zeroed”, “Thick Provision Eager Zeroed”, “Thin Provision”. The things I want to explain are the difference between “thick” and “thin” disk and the difference between “eager” and “lazy” zeroing.

Continue reading “Thick and Thin, Eager and Lazy: vSphere Disk Provisioning types”

8 Track Pi

8trackPiI’ve repurposed an 8 track tape into a case for my Raspberry Pi. Perfect for my XBMC Pi.

If you are doing this yourself, a few notes. The tape shell is in two parts. Try to find one that is clipped together rather then fused.  Look at the holes on the bottom of the tape to see what I mean. I had to dremal out some interior pins to make room for the Pi. Also had to cut a small hole in the side for the power. Please be careful!

Anyway, I love the juxtaposition of an ethernet cable going into an 8 track tape.

Creating music on Android

Lately, I’ve been looking into music composition apps on the Android. I’ve found a few that I like. Electrum is a straight-forward drum machine. I like that it is very similar to typical drum machine programming, so if you are familiar with that, then it will be easy to pick up. It comes with some built-in drum sounds, lets you download some, or add your own. Reactable (see screenshot to the left) is a fairly experimental composition tool High learning curve. You connect samplers, loops, sequencers, delay effects, etc, to make music. I can see making decent electronic music with this, but I’m still learning. I’m also experimenting with NodeBeat (fun and easy to use but creatively limited) and SPC (looks like a loop sequencer mostly but I haven’t spent much time with this one). I’ll probably write more on these later after I’ve had a chance to use them some more. Maybe even post some MP3s.

Fix Android “Low on space” message

I finally found a fix. I’ve been getting the “Low on space – phone storage space is getting low” message on my HTC Incredible often. I get this message even when I have hundreds of MB free. I’ve tried ignoring the message (no other problems really come up). I’ve tried deleting applications– that sometimes works, sometimes doesn’t. I think I’ve figured out what it is. The fix isn’t permanent, but it does clear the message.

Please read and understand the whole thing if you plan to do what I’ve done below. It’s involves deleting data– you may lose important information.

Continue reading “Fix Android “Low on space” message”