If you can draw it, you can discover its name. Shapecatcher has a database of more than 10,000 Unicode characters. Draw the one you are interested in and it will return a list of possible matches.
This is excellent.
(via: Everybody)
All things considered my colonoscopy experience was surprisingly good. While some parts of the process were uncomfortable none of it was horrible. Best of all I have a clean bill of health.
The preparation starts 24 hours before the procedure when you switch to a clear liquids only diet. Clear liquids include some juices, broth, hard candy, and Jello. You just have to stay away from anything with red coloring. I started yesterday with an enormous breakfast – a Belgium waffle, two fried eggs and two sausage patties. My normal breakfast routine is a bowl of cold cereal with milk and a glass of orange juice. Being pleasantly over full helped to curb my hunger pains most of the day. The richness of the food also contributed in a mild bout of diarrhea which made the evening preparation activity easier I think.
At three o’clock I took four tablets of a laxative. Starting at six o’clock I drank 8 ounces of laxative laced Gatorade every 15 minutes until I’d consumed an entire gallon. From reading online I knew that in the past this was the hardest part of the whole process. The mixture used to taste like dirty salt water and caused a powerful urge to vomit. My mixture, in orange Gatorade, only had a mild chalky after taste. The only issue with downing each glassful was still feeling full from the previous glass. Once the mixture started doing its thing the fullness issue went away.
By 8:15 I was done with the gallon but not done in the bathroom. It was closer to 10:30 or 11 before I felt like I could go to bed without needing to get up in a hurry. Out of curiosity I weighed myself just prior to starting the gallon and then again at the conclusion of taking it. I had only gained a pound in the two intervening hours, a neat trick when you consider a gallon of water weighs 8 pounds. By the time my bowels had subsided for the night I was down 1 pound rom my starting weight. This morning I was 2.5 pounds lighter than yesterday’s weight.
This morning I had the mildly uncomfortable sensation of needing to go but being unable to produce any thing. When I ask about that at the surgical center I was told this was normal. At the surgery center they started an IV, hooked me up to an automatic blood pressure cuff, and hooked up leads to monitor my blood oxygen saturation and pulse. After a brief pre-procedure visit with the doctor the sedation nurse used the IV to give me a couple drugs, one for pain and a sedative. The next thing I was aware of was being given some juice to drink in the recovery room.
After eating a banana on the ride home I crawled into bed and slept for a couple hours. Lunch after my nap was delicious. Since air is pumped into the colon during the procedure there is some post-procedure gas and mild cramps. Otherwise I feel great.
Since no polyps were found and no other issues discovered I don’t have to repeat this test for another ten years. If you are over the age of 50 and haven’t had a screening for colon cancer don’t let street “knowledge” about how awful colonoscopies are keep you form completing one. It’s one day out of 10 years and may save your life.
Pi, the ratio is correct, but many of its uses may be wrong. Or at least ill-advised.
(via: @stevelosh)
The new shell prompt I created for myself is working wonderfully. However, the Subversion prompt was only effective when I was in the root directory of a Subversion project. Once I drilled down into sub-directories the prompt, which depended upon the presence of a .svn directory, lost all Subversion information.
After much fiddling around last night I came up with a simple change that allows the Subversion information to be displayed, regardless of where I am in the directory hierarchy under the root directory of a Subversion controlled project.
Here’s the code:
{% raw %}
# ----------------------------------------------------------------------------
# svn prompt
# based on: https://gist.github.com/1156969
# with help from: http://andrewray.me/bash-prompt-builder/index.html
#
# Only the root directory holds the .svn repository. We need to test each directory in the current
# directory's path to determine if we are under Subversion control.
# ----------------------------------------------------------------------------
function svn_prompt_info {
# Set up defaults
local svn_branch=""
local svn_repository=""
local svn_version=""
local svn_change=""
# if `svn info` returns more than 1 line, we are under subversion control
testsvn=`svn info > /dev/null 2>&1 | wc -l`
if [ $testsvn -gt 1 ] ; then
# query svn info and parse the results
svn_branch=`svn info | grep '^URL:' | egrep -o '((tags|branches)/[^/]+|trunk).*' | sed -E -e 's/^(branches|tags)\///g'`
svn_repository=`svn info | grep '^Repository Root:' | egrep -o '(http|https|file|svn|svn+ssh)/[^/]+' | egrep -o '[^/]+$'`
svn_version=`svnversion -n`
# this is the slowest test of the bunch
change_count=`svn status | grep "?\|\!\|M\|A" | wc -l`
if [ "$change_count" != " 0" ]; then
svn_change=" [dirty]"
else
svn_change=""
fi
# show the results
echo "%{$fg[blue]%}$svn_repository/$svn_branch @ $svn_version%{$reset_color%}%{$fg[yellow]%}$svn_change%{$reset_color%}"
fi
}
{% endraw %}The testsvn variable on line 17 is set to the result of running an svn info and then counting the lines of output via wc -l. By shunting the output of the command into /dev/null it’s quiet, i.e., no output leaks out into the shell. And the 2>&1 bit captures the error message produced when svn info is run in a non-Subversion controlled directory. So, if I’m in a Subversion project the line count (wc -l) will be about 12. If I’m not in a Subversion project, there will be a single line counted – the error produced.
The if statement on line 18 determines if there count is greater than 1 and if so, builds the Subversion portion of the prompt.
Everything else stays the same as I had it before. It works beautifully.
Ala Calvin and Hobbes. (Found on Twitter, but I can’t find the tweet anymore.)
I’ve been using zsh has my primary shell since attending Überconf last July in Denver Colorado. For all intents and purposes it’s a superset of the venerable bash shell. I’ve also been using oh-my-zsh, which is a community driven framework for managing your zsh configuration.
Yesterday evening I refactored my prompt using Steve Losh’s My Extravagant Zsh Prompt posting as a jumping off point. The end result is a nicely colorful, informationally dense prompt. In addition to showing me what machine I’m on, it displays the current working directory, the Ruby version, and information about source control should the working directory contain either a Git, Mercurial (hg), or Subversion (svn) repository.
A picture, or screen shot, is worth a thousand words.

And here’s an annotated image that explains all the parts and pieces.

##What You’ll Need
##Create an oh-my-zsh theme
I copied the Soliah theme when I started with oh-my-zsh originally. Over time I’ve completely modified it to suit my tastes. Browse through the theme offerings and find one you like. Make a copy and give it a unique name. I named mine after my domain, or zanshin.zsh-theme.
You can grab a copy of my theme file from my dotfiles repository on Github.
##The Prompt From left to right my prompt shows me:
user name I’m currently logged in underhostname of the machine I’m currently atpath to the current working directoryIf there is a source control repository present at the working directory, git, hg, or svn, information about the state of the repository is shown next.
For Git repositories the prompt character changes to a ± and this information is shown:
branch name[dirty] flag if there are tracked but not committed changes[untracked] flag if there are untracked changes presentFor hg repositories the prompt character changes to a ☿ and the following information is shown:
branch nametipFor svn repositories the prompt character changes to a ⚡ and the following information is shown:
trunk, branch, or tag currently checked outrevision number[dirty] indicator if there are uncommitted changes##Right Prompt
Zsh supports the idea of a right prompt and I’ve made use of this to show the current Ruby version. I’m using rbenv to manage my Ruby versions. The presence of a .rbenv-version file triggers changing the Ruby in effect. My right prompt queries rbenv to determine what to display.
RPROMPT='%{$fg[red]%}$(rbenv version-name)%{$reset_color%}%'##Subversion Prompt Steve Losh’s prompt works beautifully as-is for git and hg repositories. I wanted to extend my prompt to work for subversion repositories since my employer is subversion-based. I got the bulk of my svn prompt from this Landon Fuller gist.
{% gist 1156969 %}
I stripped out some of his code, paring it down to just the bare essentials to display svn information. What his prompt script didn’t provide was a way to indicate whether or not the working directory had uncommitted changes. Using output from the bash prompt builder as an example I was able to add a test for uncommitted changes.
##Source Code Here’s a copy of the complete zsh-theme I’m using.
{% raw %}
# ----------------------------------------------------------------------------
# Using bits from Steve Losh
# http://stevelosh.com/blog/2010/02/my-extravagant-zsh-prompt/
# ----------------------------------------------------------------------------
# ----------------------------------------------------------------------------
# Shows little symbol '±' if you're currently at a git repo,
# '☿' if you're currently at a hg repo,
# '⚡' if you're currently at a svn repo,
# and '○' all other times
# ----------------------------------------------------------------------------
function prompt_char {
git branch >/dev/null 2>/dev/null && echo '±' && return
hg root >/dev/null 2>/dev/null && echo '☿' && return
svn info >/dev/null 2>/dev/null && echo '⚡' && return
echo '○'
}
# ----------------------------------------------------------------------------
# hg prompt
# depends upon ~/Projects/hg/hg-prompt
# ----------------------------------------------------------------------------
function hg_prompt_info {
hg prompt --angle-brackets "\
< on %{$fg[magenta]%}<branch>%{$reset_color%}>\
< at %{$fg[yellow]%}<tags|%{$reset_color%}, %{$fg[yellow]%}>%{$reset_color%}>\
%{$fg[green]%}<status|modified|unknown><update>%{$reset_color%}<
patches: <patches|join( → )|pre_applied(%{$fg[yellow]%})|post_applied(%{$reset_color%})|pre_unapplied(%{$fg_bold[black]%})|post_unapplied(%{$reset_color%})>>" 2>/dev/null
}
# ----------------------------------------------------------------------------
# svn prompt
# based on: https://gist.github.com/1156969
# with help from: http://andrewray.me/bash-prompt-builder/index.html
# ----------------------------------------------------------------------------
function svn_prompt_info {
# Set up defaults
local svn_branch=""
local svn_repository=""
local svn_version=""
local svn_change=""
# only if we are in a directory that contains a .svn entry
if [ -d ".svn" ]; then
# query svn info and parse the results
svn_branch=`svn info | grep '^URL:' | egrep -o '((tags|branches)/[^/]+|trunk).*' | sed -E -e 's/^(branches|tags)\///g'`
svn_repository=`svn info | grep '^Repository Root:' | egrep -o '(http|https|file|svn|svn+ssh)/[^/]+' | egrep -o '[^/]+$'`
svn_version=`svnversion -n`
# this is the slowest test of the bunch
change_count=`svn status | grep "?\|\!\|M\|A" | wc -l`
if [ "$change_count" != " 0" ]; then
svn_change=" [dirty]"
else
svn_change=""
fi
# show the results
echo "%{$fg[blue]%}$svn_repository/$svn_branch @ $svn_version%{$reset_color%}%{$fg[yellow]%}$svn_change%{$reset_color%}"
fi
}
# ----------------------------------------------------------------------------
# git prompt variables
# depends on using Steve Losh fork of oh-my-zsh
# ----------------------------------------------------------------------------
ZSH_THEME_GIT_PROMPT_PREFIX=" on %{$fg[blue]%}"
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[yellow]%} [dirty]"
ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg[yellow]%} [untracked]"
ZSH_THEME_GIT_PROMPT_CLEAN=""
# ----------------------------------------------------------------------------
# zee prompt (ha ha)
# ----------------------------------------------------------------------------
PROMPT='
%{$fg[blue]%}%n%{$reset_color%} at %{$fg[yellow]%}%m%{$reset_color%} in %{$fg[green]%}${PWD/#$HOME/~}%b%{$reset_color%}$(hg_prompt_info)$(git_prompt_info)$(svn_prompt_info)
$(prompt_char) '
# ----------------------------------------------------------------------------
# rubies are red, and so my Ruby version is too
#----------------------------------------------------------------------------
RPROMPT='%{$fg[red]%}$(rbenv version-name)%{$reset_color%}%'
{% endraw %}
The chief driving instructor at Nürburgring takes a F1 car out for a spin – on ice and snow. The second half of the video is better as it doesn’t have the cheesy music sound track.
For comprison sake, here’s the fastest lap ever done.
And, just to be complete, here’s a motorcycle lap of the same circuit.
(via: @ihnatko)
Since I am reinstalling everything on my machine this week I decided to switch from RVM to rbenv. The biggest reason for the switch is to try something new. Also, rbenv doesn’t fiddle with commands like cd in order to work.
##Removing rvm
Removing rvm is dead simple and necessary as the two won’t co-exist nicely.
$ rvm implode
You may also want to run
$ gem uninstall rvm
##Installing rbenv
I used brew, but you can installing manually too if you like.
$ brew install rbenv
$ brew install ruby-build
ruby-build is a plug-in that allows for easier building of Rubies. Once the two brew commands are done you will need to add the following to your bash or zsh profile:
eval "$(rbenv init -)"
##Getting a Ruby
Downloading and building a Ruby is simple:
$ env CC=/usr/bin/gcc rbenv install 1.9.3-p125
As of version 4.2, Xcode is LLVM-only and no longer includes GCC. You can install GCC with these binary
packages on Mac OS X: https://github.com/kennethreitz/osx-gcc-installer/downloads. Once you’ve got a working gcc compiler in place, the env CC=/usr/bin/gcc specifies its location. And 1.9.3-p125 is the version and patch level of Ruby to compile.
##Displaying Ruby Information in your Prompt
Adding a display of the current Ruby version to my zsh prompt was also easy. I simply embedding the following into my prompt:
rbenv version-name
##Setting Ruby Version Setting the Ruby version to use globally or for a project is also simple. To set the global Ruby version issue a command like this:
$ rbenv global 1.9.3-p125
You can override the global version on a per project basis like so:
$ rbenv local 1.9.2-p290
Both of these commands result in a .rbenv-version file being written that contains the appropriate version indication.
The README file for the rbenv repository on Github lays all of this and more out very nicely.