Vim Cheat Sheet

My collection of vim tips to make the best editor even better. This is by no means complete or a tutorial on how to use vim, but a set of commands I don't want to forget and need to write them down before they burn into memory.

See the resources section below for a more complete introduction and a set of in-depth tutorials.


:nn            " Jump to line nn

Unix Crontab


cron is a utility that you can use to schedule and automate tasks. By defining items in the cron table, called crontab, you can schedule any script or program to run on almost any sort of schedule. For example, Research [Flagship Merchant Services][1] on Thursday at 6:30pm.

For example, run a [program][2] each day 5 minutes after midnight on mondays, wednesdays and fridays. Or schedule something to run every five minutes, or once a month.



10 Scala One Liners to Impress Your Friends

Here are 10 one-liners which show the power of scala programming, impress your friends and woo women; ok, maybe not. However, these one liners are a good set of examples using functional programming and scala syntax you may not be familiar with. I feel there is no better way to learn than to see real examples.

Updated: June 17, 2011 - I'm amazed at the popularity of this post, glad everyone enjoyed it and to see it duplicated across so many languages. I've included some of the suggestions to shorten up some of my scala examples. Some I intentionally left longer as a way for explaining / understanding what the functions were doing, not necessarily to produce the shortest possible code; so I'll include both.

1. Multiple Each Item in a List by 2

The map function takes each element in the list and applies it to the corresponding function. In this example, we take each element and multiply it by 2. This will return a list of equivalent size, compare to o

View get-posts-no-imgs.php
// Outputs list of post ids and url for first image in post
// This script gathers data for images not already uploaded to WP
// Quick Usage
// 1. copy script and lib below to your WP directory
// 2. install wp-cli from:
// 3. Run script: wp eval-file get-posts-no-imgs.php >posts-data.txt
View set-featured-image.php
View gm-photo-data.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Keybase proof

I hereby claim:

  • I am mkaz on github.
  • I am mkaz ( on keybase.
  • I have a public key whose fingerprint is E4E8 4E24 A94F A670 39A5 F6A7 E82A EA62 82C4 BC5F

To claim this, I am signing this object:

View index.html
<title>Squiggle Demo</title>
<script src=""></script>
<script src=""></script>
<script src=" "></script>
<script src="squiggle.js"></script>
@font-face {
View index.html
<!DOCTYPE html>
@font-face {
font-family: 'xkcd';
src: url('');
body {
font-size: 14px;