<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"><channel><atom:link rel="hub" href="http://tumblr.superfeedr.com/" xmlns:atom="http://www.w3.org/2005/Atom"/><description>a tumblelog by ches @ whiskeyandgrits


Twitter


</description><title>crumbtrail</title><generator>Tumblr (3.0; @ches)</generator><link>http://crumbtrail.chesmartin.net/</link><item><title>GNU screen Wrapper for SSH Agent Forwarding</title><description>&lt;p&gt;This problem is well-documented around the web, this is just my personal reminder. Others have crafted various solutions varying in complexity. I like this one for the simplicity and easy portability—I don’t remember who to credit for it, unfortunately.&lt;/p&gt;

&lt;p&gt;Without getting too deeply into the gory details, if you connect to a remote shell and run GNU &lt;code&gt;screen&lt;/code&gt; there, then detach the screen and come back to it in a later SSH session, environment variables that &lt;a href="http://unixwiz.net/techtips/ssh-agent-forwarding.html"&gt;SSH agent forwarding&lt;/a&gt; requires to function will have changed and your &lt;code&gt;screen&lt;/code&gt; session is none the wiser. This is rather annoying if you frequently connect to a gateway server and use &lt;code&gt;screen&lt;/code&gt; to do work on other servers inside of it—your public key will not be forwarded to the internal servers on subsequent connections.&lt;/p&gt;

&lt;p&gt;Enter wrapper script to save new SSH variables when you connect again and resume your &lt;code&gt;screen&lt;/code&gt; session:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;#!/bin/bash
# Wrapper script to set SSH env vars so agent forwarding works when
# resuming screen sessions. Place at ~/bin/screen and make sure
# your personal bin directory has priority in your PATH

for SSHVAR in SSH_CLIENT SSH_TTY SSH_AUTH_SOCK SSH_CONNECTION DISPLAY; do
    echo "export ${SSHVAR}=\"${!SSHVAR}\""
done &gt; ~/.sshvars
/usr/bin/screen $*
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Then, a simple alias for your &lt;code&gt;.bashrc&lt;/code&gt;, to run once you’ve resumed &lt;code&gt;screen&lt;/code&gt;:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;# After reconnecting to a screen session, this restores env vars
# to allow agent forwarding to work again
alias fixssh='source ~/.sshvars'
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Off you go to now to connect to those internal servers needing your forwarded key.&lt;/p&gt;</description><link>http://crumbtrail.chesmartin.net/post/213631924</link><guid>http://crumbtrail.chesmartin.net/post/213631924</guid><pubDate>Thu, 15 Oct 2009 05:00:00 -0400</pubDate></item><item><title>Sanely Rebuild Corrupt Font Caches on OS X</title><description>&lt;p&gt;For Leopard, at least:

&lt;code&gt;&lt;pre&gt;
# Clear user font caches
$ atsutil databases -removeUser

# And system cache
$ sudo atsutil databases -remove

# Restart the ATS server
$ atsutil server -shutdown
ATSServer shutdown
$ atsutil server -ping
ATSServer is running

# Check for filesystem activity (this is just generally cool)
$ sudo fs_usage | grep ATS
&lt;/pre&gt;&lt;/code&gt;

You might possibly still need to restart applications, log out and back in, or restart completely.

Thanks to the fine people on &lt;a href="http://www.macosxhints.com/article.php?story=20071026081555971"&gt;this thread&lt;/a&gt;.&lt;/p&gt;</description><link>http://crumbtrail.chesmartin.net/post/207661404</link><guid>http://crumbtrail.chesmartin.net/post/207661404</guid><pubDate>Thu, 08 Oct 2009 12:56:00 -0400</pubDate></item><item><title>"The future is no more uncertain than the present."</title><description>“The future is no more uncertain than the present.”&lt;br/&gt;&lt;br/&gt; - &lt;em&gt;Walt Whitman&lt;/em&gt;</description><link>http://crumbtrail.chesmartin.net/post/136079506</link><guid>http://crumbtrail.chesmartin.net/post/136079506</guid><pubDate>Sun, 05 Jul 2009 20:01:00 -0400</pubDate></item><item><title>"I’m no good at those “guess how many jelly beans are in the jar” things though...."</title><description>“I’m no good at those “guess how many jelly beans are in the jar” things though. Usually you just win the jar anyway, and who wants that many jelly beans?”</description><link>http://crumbtrail.chesmartin.net/post/62629774</link><guid>http://crumbtrail.chesmartin.net/post/62629774</guid><pubDate>Tue, 02 Dec 2008 10:43:33 -0500</pubDate></item><item><title>Gorefest</title><description>&lt;p&gt;‘clean blood stain’ is probably one of those Web History moments where you want to make certain that you’re logged out of your Google account.&lt;/p&gt;</description><link>http://crumbtrail.chesmartin.net/post/58262740</link><guid>http://crumbtrail.chesmartin.net/post/58262740</guid><pubDate>Thu, 06 Nov 2008 01:53:00 -0500</pubDate></item><item><title>Um... Arrrr!!</title><description>Ches&lt;br /&gt;&#13;
I've switched Facebook to Pirate speak and it's pretty awesome&lt;br /&gt;&#13;
&lt;br /&gt;&#13;
Sophie&lt;br /&gt;&#13;
You win!  That's the most inane thing I've heard so far today</description><link>http://crumbtrail.chesmartin.net/post/52929208</link><guid>http://crumbtrail.chesmartin.net/post/52929208</guid><pubDate>Fri, 03 Oct 2008 12:39:00 -0400</pubDate></item><item><title>Get the Ruby mysql gem to build with MySQL installed from 64-bit binary installer:


sudo env...</title><description>&lt;p&gt;Get the Ruby mysql gem to build with MySQL installed from 64-bit binary installer:

&lt;pre&gt;&lt;code&gt;
sudo env ARCHFLAGS=”-Os -arch x86_64 -fno-common” \
gem install mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config
&lt;/code&gt;&lt;/pre&gt;

Courtesy of synth @ &lt;a href="http://cho.hapgoods.com/wordpress/?p=158"&gt;Chris Cruft » Blog Archive » Ruby, Rails and MySQL with Leopard 10.5.2 and XCode 3.0&lt;/a&gt;&lt;/p&gt;</description><link>http://crumbtrail.chesmartin.net/post/39586085</link><guid>http://crumbtrail.chesmartin.net/post/39586085</guid><pubDate>Mon, 23 Jun 2008 21:50:00 -0400</pubDate></item><item><title>Sophie&#13;</title><description>Sophie&lt;br /&gt;&#13;
Do you know what I would have to do to make $65 an hour?&lt;br /&gt;&#13;
&lt;br /&gt;&#13;
Ches&lt;br /&gt;&#13;
does it involve a pole and acrylic shoes?</description><link>http://crumbtrail.chesmartin.net/post/30806389</link><guid>http://crumbtrail.chesmartin.net/post/30806389</guid><pubDate>Fri, 04 Apr 2008 15:57:24 -0400</pubDate></item><item><title>Swap Control and Caps Lock in X.Org</title><description>&lt;p&gt;In the keyboard section of xorg.conf:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Option          "XkbOptions"    "ctrl:swapcaps"&lt;/code&gt;&lt;/p&gt;

This will naturally effect all X users on a system, so you may want to look at alternatives if you’re not the only one using your system ;-)</description><link>http://crumbtrail.chesmartin.net/post/30331933</link><guid>http://crumbtrail.chesmartin.net/post/30331933</guid><pubDate>Mon, 31 Mar 2008 03:54:14 -0400</pubDate></item><item><title>Bash Prompt</title><description>&lt;p&gt;&lt;code&gt;export PS1="\n\[\033[0;32m\]\w\[\033[0m\]\n[\u@\h]\$ "&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Produces a prompt that looks something like this, with that initial newline giving some space from the output of the previous command:&lt;/p&gt;
&lt;code&gt;&lt;pre&gt;
&lt;span style="color: green;"&gt;~/src/lexblog/lexcode&lt;/span&gt;
[ches@porco]$ 
&lt;/pre&gt;&lt;/code&gt;</description><link>http://crumbtrail.chesmartin.net/post/28716092</link><guid>http://crumbtrail.chesmartin.net/post/28716092</guid><pubDate>Thu, 13 Mar 2008 01:45:00 -0400</pubDate></item><item><title>Literature and Latte - Scrivener</title><description>&lt;a href="http://literatureandlatte.com/scrivener.html"&gt;Literature and Latte - Scrivener&lt;/a&gt;: &lt;p&gt;Scrivener is a word processor and project management tool created specifically for writers of long texts such as novels and research papers. Has a screenplay mode, WriteRoom-like fullscreen edit,…&lt;/p&gt;</description><link>http://crumbtrail.chesmartin.net/post/28621677</link><guid>http://crumbtrail.chesmartin.net/post/28621677</guid><pubDate>Wed, 12 Mar 2008 02:39:52 -0400</pubDate></item><item><title>gitnub</title><description>&lt;a href="http://github.com/Caged/gitnub/wikis/home"&gt;gitnub&lt;/a&gt;: &lt;p&gt;A RubyCocoa frontend to the Git SCM.&lt;/p&gt;</description><link>http://crumbtrail.chesmartin.net/post/28621678</link><guid>http://crumbtrail.chesmartin.net/post/28621678</guid><pubDate>Wed, 12 Mar 2008 02:39:52 -0400</pubDate></item><item><title>finding that just about everything in the Rails Recipes book is useful and pertinent</title><description>&lt;p&gt;finding that just about everything in the Rails Recipes book is useful and pertinent&lt;/p&gt;</description><link>http://crumbtrail.chesmartin.net/post/28617408</link><guid>http://crumbtrail.chesmartin.net/post/28617408</guid><pubDate>Wed, 12 Mar 2008 01:39:15 -0400</pubDate></item><item><title>"It does not matter how slow you go so long as you do not stop."</title><description>“It does not matter how slow you go so long as you do not stop.”&lt;br/&gt;&lt;br/&gt; - &lt;em&gt;Wisdom of &lt;a href="http://en.wikipedia.org/wiki/Confucious" title="Confucious @ Wikipedia"&gt;Confucius&lt;/a&gt;&lt;br/&gt;&lt;/em&gt;</description><link>http://crumbtrail.chesmartin.net/post/28615025</link><guid>http://crumbtrail.chesmartin.net/post/28615025</guid><pubDate>Wed, 12 Mar 2008 01:06:53 -0400</pubDate><category>life eastern philosophy patience</category></item></channel></rss>
