With an iPhone 5 you have room for 20 apps on your home screen plus four additional apps in the dock at the bottom of the screen. Like many people (I suspect) I organize my apps such that the most frequently used are on my home screen. Here then are my 20 favorite apps.
##Felix Felix is my app.net client of choice. It’s minimal but full-featured, makes great use of taps and swipes for navigation and feature controls and only costs $2.99.
##Twitterrific Twitterrific has long been my favorite Twitter app, both on iOS and Mac OS. The iOS app already has a flattened appearance so I expect it will continue to look good against iOS 7 when that is released. Like Felix its use of gestures is superb. $2.99 for a limited time.
##Check the Weather Easily my favorite weather app, and I have three or four others installed, Check the Weather packs a lot of usable, readable information into its interface. Best of all it includes the Dark Sky precipitation forecast, which provides real-time rain and snow forecasting that actually works. $3.99 from the App Store.
##Clock I make daily use of Apple’s clock app, especially the alarm feature.
##LoseIt! I reviewed this calorie tracking app once before, and mentioned it along with the next three weight loss apps. It’s a great tool for monitoring your diet and activity. LoseIt! is free.
##WeightBot WeightBot is the slickest weight tracking app I have seen. Fun to use, which makes you more likely to track your weight. Just a $1.99.
##Moves Moves is a pedometer for your iPhone. Once setup you never have to interact with it again — it uses the notification center to keep you updated on your activity level. Moves is a free app.
##FitBit The FitBit iOS app works in conjunction with your FitBit tracker. Bluetooth syncing means you can always see daily steps and sleep record. The app is free, the tracker isn’t.
##[HackerNews][1] [1]: https://itunes.apple.com/us/app/hacker-news/id541355312?mt=8 “Hacker News” There are many, many apps for reading YCombinator’s Hacker News site. None are perfect, but this one is far better than most. Best of all it works on both iPhone and iPad. HackerNews is a free app.
##AlienBlue AlienBlue is a reddit client. As with the Hacker News client above there are many reddit clients to choose from. So far this one best meets my needs.
##[Prismatic][2] [2]: https://itunes.apple.com/us/app/prismatic-always-interesting/id551206444?mt=8 “Prismatic” Prismatic is a aggregation site that lets you choose topics or categories of interest. The site then shows you collected articles and stories based on your choices. The app is nicely minimal if a bit slow to update at times. Prismatic is a free service and the app is free too.
##Find Friends My wife and I make heavy use of this Apple app to know the current location of each other.
##Vesper Vesper is the newest addition to my home screen. It is a very minimal note taking app that just works. Best of all it’s consummately designed and implemented. Vesper is $4.99 in the App Store.
##Fantastical My favorite calendar app is Fantastical. New event creation is quite and easy due to the excellent parsing ability the app has, and the daily display of events is exactly what I need. Fantastical is $4.99.
##Photos I really haven’t looked for any other photo management apps as Apple’s does the job for me.
##Flickr The new Flickr for iPhone app is great. My use of Flickr has increased as a result of this new app. Flickr for iPhone is free.
##Clockwork Clockwork is a metronome app. It has an innovative interface with both audible and visual time indications. A variety of “tic” sounds and the ability to devise complex rhythmic patters round out this excellent tool. Clockwork is $0.99.
##Cleartune Cleartune is a sophisticated musical instrument tuner. Perfect for string players as it can tune in violin temperament or equal termperament. Cleartune is $3.99.
##TE Tuner The Tonal Energy Tuner is a suite of apps designed to complement music education. I like the tuner as it has a vibrant display. Every evening whenI practice cello I use this app to tune my instrument. TE Tuner is $3.99.
##Camera The Apple provided camera app suits my picture taking needs wonderfully. I especially like the panorama option and the ability to take videos as well as still pictures.
Using Vim as your editor with Octopress works well enough except that you have to either exit out of the editor or open a second session in order to generate the site to see your new posting. Using Vimux you can run commands in a separate pane without losing focus in your Vim pane. This turns out to be perfect for creating or editing posts for an Octopress site.
First you need to add the Vimux bundle to your Vim configuration. Since I’m
using Vundle I just added this
line to my .vimrc file.
Bundle 'benmills/vimux'And then installed the new bundle.
Bundle 'benmills/vimux'
:BundleInstallThe Vimux help (:h vimux) does a great job of explaining the various commands
and options provided by the bundle. Here are the settings I added to my
.vimrc.
Bundle 'benmills/vimux'
let g:VimuxHeight = "30"
let g:VimuxOrientation = 'v'
let g:VimuxUseNearestPane = 0The height setting controls what percentage of your current pane will be
given over to the Vimux pane. The orientation settings controls whether the new
pane is vertically below the current one (v) or horizontally to the right of
it (h). The VimuxUseNearestPane when set to true (1) will use the nearest
open tmux pane rather than space within the pane containing your Vim session.
With these settings in place I added some general Vimux mappings.
Bundle 'benmills/vimux'
nmap <leader>vp :VimuxPromptCommand<cr>This brings up a Command? prompt where you can enter any command your shell
recognizes.
Bundle 'benmills/vimux'
nmap <leader>vl :VimuxRunLastCommand<cr>As the name suggests, VimuxRunLastCommand reissues the last command.
Bundle 'benmills/vimux'
nmap <leader>vq :VimuxCloseRunner<cr>VimuxCloseRunner closes the Vimux pane.
Bundle 'benmills/vimux'
nmap <leader>vx :VimuxInterruptRunner<cr>The interrupt runner command halts the command in the runner.
Rather than have to bring up the Vimux command prompt with ,vp and then type
in my Octopress generate alias, I created some more mappings with Octopress
specific commands.
Bundle 'benmills/vimux'
nmap <leader>vg :call VimuxRunCommand("gen")<CR>
nmap <leader>vi :call VimuxRunCommand("ingen")<CR>
nmap <leader>vz :call VimuxRunCommand("dz")<CR>
namp <leader>vd :call VimuxRunCommand("deploy")<CR>The first of these, vg runs my alias for rake generate, building what ever
is currently in the source/_posts directory. I make heavy use of rake isolate as my site contains over 2,000 entries and takes more than 8 minutes
to generate.
Which explains the next mapping, vi. ingen is my alias that runs a rake integrate followed by a rake generate. Typically I only run this command
when a new posting has been proofread and is ready to be published.
I have two Octopress sites, one of which is
still on an much older version of Octopress. The rake deploy task for this
older version doesn’t handle .htaccess files, so my dz alias chains
together the commands necessary to rsync my site and copy the .htaccess files
into place.
Finally the vd mapping issues my alias for a regular rake deploy which
works for my new Octopress site.
Having Vimux in place allows me to work on a new page or posting, generating the site as I go, without losing focus in my Vim session. It has made creating new content for my sites simpler and more satisfying.
The following function displays your PATH environment variable using color
coding and showing each path entry on its own line.
path() {
echo $PATH | tr ":" "\n" | \
awk "{ sub(\"/usr\", \"$fg_no_bold[green]/usr$reset_color\"); \
sub(\"/bin\", \"$fg_no_bold[blue]/bin$reset_color\"); \
sub(\"/opt\", \"$fg_no_bold[cyan]/opt$reset_color\"); \
sub(\"/sbin\", \"$fg_no_bold[magenta]/sbin$reset_color\"); \
sub(\"/local\", \"$fg_no_bold[yellow]/local$reset_color\"); \
sub(\"/.rvm\", \"$fg_no_bold[red]/.rvm$reset_color\"); \
print }"
}
I find this function to be particularly useful when dealing with
RVM and Homebrew as they
are both particular about where in the PATH they occur.
Any one who has used a Windows computer knows about using the “three-finger” salute — Ctrl-Alt-Delete — brings up a dialog where you can quickly start the screen saver. Provided the screen saver option is configured to require a password the computer can be locked with a minimum of fuss.
Mac OS X doesn’t provide a simple keyboard shortcut to activate the screen saver and lock the computer. On MacBook laptops you can press the power button briefly which brings up a dialog allowing you to Restart, Sleep, or Shutdown the computer. The sleep option can be selected just by pressing the “S” key.
Recently I discovered that Alfred can be used to activate the screen saver. And, just like on Windows, if the screen saver is configured to require a password to wake the computer, you can lock the computer this way.
My Alfred is set up be activated with Cmd-Space. Once the Alfred dialog is displayed typing “sc” is enough to select “Screen Saver” from the list of matches. So, Cmd-Space, “sc”, and then pressing the “Enter” key activate the screen saver. I find this keystroke combination particularly useful on the iMac I have at work, especially when leaving my desk for few minutes.
Oh, and I recommend downloading Alfred from their web site rather then using the Mac App store as the App store version tends to lag behind in releases.
When I was in high school I took a typing class one semester. Each student had his or her own manual typewriter and we spent each class period learning how to type through a series of rote exercises. If I recall correctly we were allowed only two mistakes per page and we were not allowed to use erasable paper. I got to retype a lot of assignments as it was hard too keep up with the assignments and not make mistakes. My typing speed by the end of the 18 weeks was in the middle 20 range, perhaps 24 or 25 words per minute.
In college I first programmed on card punch machines and later on terminals. Card punch machines are even less forgiving than typing paper – once you make a mistake the entire card is ruined and you have to re-punch it. I tended to punch slowly so as not to make costly mistakes.
After transitioning to terminals where it was possible to backspace and correct errors my keying speed increased but so did my mistakes. I simply learned to back up and fix them. What I should have done was slow down and learn to touch type. While that had been the goal of my high school class, years of bad habits left me with my own rather unique hunt-and-peck typing style.
I type using only the thumb, fore and middle fingers on my right hand and the fore and middle fingers on my left hand. When writing prose I am able to type without looking at the key board. However when I need to type symbols I sometimes need to look to see where the character is located.
Using a couple of different online typing tests, I tested my typing speed this morning. The average works out to 56 words per minute, usually with several errors.
My goal for the next 30 days is to practice typing at least 30 minutes a day using Peter’s Online Typing Course. I like the breakdown of the lessons there. I am not so much interested in increasing my overall typing speed, but will happily take any increase that occurs. What I am interested in is improving my touch typing ability. I’d like to use all eight fingers properly and to be able to type without looking at the keyboard at all.
tmux is a terminal multiplexer. It allows you to have multiple virtual consoles open in a single terminal window. Moreover, you can detatch and attach to a tmux session without ending it, allowing you great flexibility when working on remote servers or machines. In many respects it is just like GNU Screen, but is distributed under a BSD license.
Working from tmux: Productive Mouse Free Development from Pragmatic Press I created my initial .tmux.conf file. Over time I have modified my configuration, most recently to improve the status bar information displayed. What follows is a somewhat annotated listing of my tmux configuration.
# use UTF8
set -g utf8
set-window-option -g utf8 on
# make tmux display things in 256 colors
set -g default-terminal "screen-256color"
# set scrollback history to 10000 (10k)
set -g history-limit 10000
# set Ctrl-a as the default prefix key combination
# and unbind C-b to free it up
set -g prefix C-a
unbind C-b
# use send-prefix to pass C-a through to application
bind C-a send-prefix
# shorten command delay
set -sg escape-time 1
# set window and pane index to 1 (0 by default)
set-option -g base-index 1
setw -g pane-base-index 1
# reload ~/.tmux.conf using PREFIX r
bind r source-file ~/.tmux.conf \; display "Reloaded!"
# use PREFIX | to split window horizontally and PREFIX - to split vertically
bind | split-window -h
bind - split-window -v
# Make the current window the first window
bind T swap-window -t 1
# map Vi movement keys as pane movement keys
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# and use C-h and C-l to cycle thru panes
bind -r C-h select-window -t :-
bind -r C-l select-window -t :+
# resize panes using PREFIX H, J, K, L
bind H resize-pane -L 5
bind J resize-pane -D 5
bind K resize-pane -U 5
bind L resize-pane -R 5
# explicitly disable mouse control
setw -g mode-mouse off
set -g mouse-select-pane off
set -g mouse-resize-pane off
set -g mouse-select-window off
# ---------------------
# Copy & Paste
# ---------------------
# provide access to the clipboard for pbpaste, pbcopy
set-option -g default-command "reattach-to-user-namespace -l zsh"
set-window-option -g automatic-rename on
# use vim keybindings in copy mode
setw -g mode-keys vi
# setup 'v' to begin selection as in Vim
bind-key -t vi-copy v begin-selection
bind-key -t vi-copy y copy-pipe "reattach-to-user-namespace pbcopy"
# update default binding of 'Enter' to also use copy-pipe
unbind -t vi-copy Enter
bind-key -t vi-copy Enter copy-pipe "reattach-to-user-namespace pbcopy"
bind y run 'tmux save-buffer - | reattach-to-user-namespace pbcopy '
bind C-y run 'tmux save-buffer - | reattach-to-user-namespace pbcopy '
# ----------------------
# set some pretty colors
# ----------------------
# set pane colors - hilight the active pane
set-option -g pane-border-fg colour235 #base02
set-option -g pane-active-border-fg colour240 #base01
# colorize messages in the command line
set-option -g message-bg black #base02
set-option -g message-fg brightred #orange
# ----------------------
# Status Bar
# -----------------------
set-option -g status on # turn the status bar on
set -g status-utf8 on # set utf-8 for the status bar
set -g status-interval 5 # set update frequencey (default 15 seconds)
set -g status-justify centre # center window list for clarity
# set-option -g status-position top # position the status bar at top of screen
# visual notification of activity in other windows
setw -g monitor-activity on
set -g visual-activity on
# set color for status bar
set-option -g status-bg colour235 #base02
set-option -g status-fg yellow #yellow
set-option -g status-attr dim
# set window list colors - red for active and cyan for inactive
set-window-option -g window-status-fg brightblue #base0
set-window-option -g window-status-bg colour236
set-window-option -g window-status-attr dim
set-window-option -g window-status-current-fg brightred #orange
set-window-option -g window-status-current-bg colour236
set-window-option -g window-status-current-attr bright
# show host name and IP address on left side of status bar
set -g status-left-length 70
set -g status-left "#[fg=green]: #h : #[fg=brightblue]#(curl icanhazip.com) #[fg=yellow]#(ifconfig en0 | grep 'inet ' | awk '{print \"en0 \" $2}') #(ifconfig en1 | grep 'inet ' | awk '{print \"en1 \" $2}') #[fg=red]#(ifconfig tun0 | grep 'inet ' | awk '{print \"vpn \" $2}') "
# show session name, window & pane number, date and time on right side of
# status bar
set -g status-right-length 60
set -g status-right "#[fg=blue]#S #I:#P #[fg=yellow]:: %d %b %Y #[fg=green]:: %l:%M %p :: #(date -u | awk '{print $4}')::"For a time I used tmux-powerline for my status bar. However this felt like a sledgehammer for peanuts kind of solution. This past weekend I removed tmux-powerline and created the status bar setup shown above. With the potential to show four IP address the left side of the status bar is a bit crowded, but I only ever use tmux in a full screen terminal window so I have real estate to spare.
The right side of the status bar displays the session name, screen and pane numbers, date, and local time, and finally UTC time. The middle of the status bar shows a list of the current windows.
The status bar colors are loosely based on tmux-colors-solarized.
You can see my .tmux.conf, along with my entire dotfiles collection by visiting my dotfiles repository on GitHub.
Increasingly I rely upon libraries and applications installed via Homebrew. In addition the commands for listing installed brews, searching for new brews, or installing brews, there are several maintenance commands that should be run on a regular basis in order to keep your brews healthy and happy.
Rather then run these commands serially, and manually, I’ve created the following alias that runs them for me.
$ alias bu='brew update; brew upgrade; brew cleanup; brew doctor'brew update updates the Homebrew installation making sure you have the latest version installed. It also refreshes the list of available brews to their latest versions.
brew upgrade upgrades any brews you have installed to the latest version as provided for my the update step above.
brew cleanup removes outdated brews from your Cellar and keeps your installation tidy.
brew doctor verifies that all the components necessary for brew to work properly (like having the current Xcode command line tools) are in place and functioning.
Every day I take a moment to run bu in my Terminal and my Homebrew setup works reliably as a result.
Out of the box Mac OS X version 10.8.x (Lion) comes with zsh version 4.3.11 (i386-apple-darwin12.0). However zsh is currently at version 5.0.2 (x86_64-apple-darwin12.2.1). Here’s how to use the newer version.
Install zsh using Homebrew.
$ brew install zshEdit /etc/shells to add a new entry for the Homebrew zsh.
$ brew install zsh
$ sudo vim /etc/shellsThe resulting /etc/shells file should look like this:
$ cat /etc/shells
/bin/bash
/bin/csh
/bin/sh
/bin/tcsh
/bin/zsh
/usr/local/bin/zshThe /usr/local/bin/zsh location is the symlink Homebrew creates when installing zsh.
To actually change the shell assigned to your user account run
$ chsh -s /usr/local/bin/zshNow you have the most recent zsh as your shell.
Removing a Git submodule is nowhere near as easy as adding one. In my projects I typically use a submodule for managing dependencies that are themselves a Git repository. When that dependency goes away it is necessary to remove the submodule. Here’s how I go about that task.
First delete the relevant section from the .gitmodules file at the root of the parent project. This section will have this format:
[submodule "vendor"]
path = vendor
url = git://github.com/some-user/some-repo.gitNext stage the .gitmodules file.
$ git add .gitmodulesNow delete the relevant section from the config file located in the .git directory at the root of the project. It will look something like this:
[submodule "vendor"]
url = git://github.com/some-user/some-repo.gitNow it’s time to use git rm to tell Git to stop tracking the submodule.
$ git rm --cached path/to/submoduleBe careful not to include a trailing slash on the git rm command as it will cause errors.
Now that no longer is tracking the submodule it can be deleted from the file system.
$ rm -rf .git/modules/submodule_nameCommit the changes to the repository.
$ git commit -m "Removed <vendor> submodule."Finally you can delete the actual submodule.
$ rm -rf path/to/submoduleThat’s it. The submodule has been completely removed from Git and removed from the file system.
In order to provide as much as 30-days of stand-by time on Retina MacBook computers that are equipped with Solid-State Drives (SSD) the computer is configured to enter deep hibernation after just one hour stand-by time by default. Upon waking the computer after an hour or more has passed there will be a 3 to 5 second delay as the data that was cached to the SSD is recovered so that the computer’s state can be restored.
I personally found this delay to be annoying and so I changed the stand-by delay to be longer. Instead of the default 4200 seconds, or seventy minutes, I have mine set to 86,400 seconds or 1,440 minutes. Which is 24 hours.
Open Terminal.app and issue the following command to see the current settings.
$ pmset -gHere is the output on my computer prior to changing the standbydelay.
Active Profiles:
Battery Power 1*
AC Power 2
Currently in use:
standbydelay 4200
standby 1
halfdim 1
sms 1
hibernatefile /var/vm/sleepimage
darkwakes 0
disksleep 10
sleep 10
autopoweroffdelay 14400
hibernatemode 3
autopoweroff 1
ttyskeepawake 1
displaysleep 2
acwake 0
lidwake 1By issuing this command,
$ sudo pmset -a standbydelay 86400I changed the stand-by delay to be a full 24 hours.
It is also possible to change the hibernationmode setting, by default 3 to 0 which would eliminate hibernation entirely. I choose to simply delay hibernation rather than eliminate it.
This thread on apple.stackexchange.com has more details.
Since making the change my 13" Retina MacBook Pro awakens immediately on most occasions, as I tend to use it every day.