Archive for March 2015

March, 2015, Hodge-Podge   Leave a comment

(Pecan) Pi Day
Why I Ride: pecan pie with @buonaterra_gelato caramel gelato #foodcatspens #food

New Glasses
New reading glasses–what do y'all think? #selfie

Beso and his girl play on her iPad
Beso and his girl play Geometry Dash #cats #catsofinstagram #foodcatspens

Cake Time! #food #baking #foodcatspens

People tend to leave monitors on at my office. I suggested they do something about it. They did.
Wow! I entered a suggestion in the employee initiative inbox, and they did it! #green

Oops! Better late than never!

Advertisements

Posted 2015-03-28 by Mr. Guilt in Hodge-Podge

Start of #P4P #wp   Leave a comment

via Instagram

Posted 2015-03-21 by Mr. Guilt in Uncategorized

22.07 Miles: Oxford isn’t the same without the Water Tower #iwbmattkyt #wp   Leave a comment

via Instagram

Posted 2015-03-15 by Mr. Guilt in Uncategorized

.emacs in the Cloud   Leave a comment

As I mentioned, my preferred text entry tool is a fountain pen. That doesn’t work on a computer. While I use a variety of email clients, Microsoft Word, and browser-based tools, my text editor of choice is GNU EMACS. Part of it is an appreciation of its heritage–this software dates back to the Seventies. It’s my choice in the long-running editor war with (the far inferior) vi. It’s multi-platform: I can use essentially the same tool in OS X, Windows, LINUX, and other operating systems. Designed in the days of VT100 terminals, it is as happy at the command prompt as it is in a GUI.

I appreciate the power. It can be configured to support different programming languages, or automate some processes. Hypothetically, I could use it as my email client (though I haven’t quite mastered getting it right), or act as a web browser. Some have compared it to an operating system.

The key configuration file is called .emacs (“dot emacs”). People spend years tuning and adjusting their .emacs file. I recently realized I was pasting in chunks from the various files on various systems. I wondered: in this era of cloud storage, could I have one .emacs to manage all my systems? For that matter, could I also use cloud storage to be the location for my extension modules. The advantage of this approach is I can ensure the settings are the same on each machine. Ideally, this also means that any modules I install will be present as well. There may be some tuning per machine, but, for the most part, it will be in common.

I decided my approach would be to host my core .emacs and modules on Copy.com as my cloud provider, though I think it could be used with OneDrive, Google Drive, or a similar product. Each machine would have a local .emacs that would point to the shared one, which I’m calling dot.emacs, though it could readily be called shared.emacs or common.emacs. dot.emacs would set some common settings, as well as machine-specific ones based on the hostname (the name assigned to a given computer).

Most cloud storage services create a spot on the local hard drive to point the cloud files to. On my MacBook, it’s /users/mrguilt/copy; on the WorkTop, it’s c:\users\my.real.name\copy. On the cloud, I created a directory called elisp for all the EMACS files, including dot.emacs. A variable, cloud-dir, is set th point to the cloud elisp directory, so all the modules I use can exist there. The local .emacs looks like this:



;;;Creates a variable pointing to where the cloud directory appears on 
;;;this machine.
(setq cloud-dir "~/Copy/elisp") ;;;showswhere the cloud elisp directory is. 

;;;Hand-off to shared "dot-emacs" file (dot.emacs.el)
(add-to-list 'load-path cloud-dir)
(load-library "dot.emacs")

dot.emacs does the heavy lifting of settings. Notionally, I divided it into four sections or subsections:

  1. First, I wanted to test if the GUI version of EMACS was being used, or a terminal version, and make settings based on that.
  2. Within the GUI vs. terminal sections, I wanted to make some per-machine settings. Primarily, this is about fonts and colors, though other local settings may go into that section.
  3. Set some basic parameters, like what mode to activate for certain file types, whether or not I want backup files, etc.
  4. Set up and load any extensions, such as a twitter client.

The dot.emacs, which needs to be named dot.emacs.el, looks a bit like this:



;;;GUI vs. terminal, and per-machin settings
(if (display-graphic-p)
    (progn
      (print "It's a GUI!") ;;; I like to have some feedback, for testing among other things
      ;;;General GUI Stuff
      (tool-bar-mode -1) ;Turn Off Toolbar
      (set-fringe-mode '(0 . 0)) ;;;Turn off fringe mode

      ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
      ;;; Checking what machine I'm using, and setting fonts and other local settings
      (if (string= system-name "WorkTop")
	  (progn
	    (print "It's the WorkTop!")
	    (set-face-attribute 'default nil :font "Consolas")
	    (set-face-attribute 'default (selected-frame) :height 120) ;;;Make the typeface a bit bigger (120%). 
	    (set-background-color "#FFFFCC")
      (if (string-match "MacBook.*" system-name) ;;;Work-Around for 10.10's hostname bug
	  (progn
	    (print "It's the MacBook!")
	    (set-face-attribute 'default nil :font "Anonymous Pro")
	    (set-face-attribute 'default (selected-frame) :height 165) ;;;Make the typeface a bit bigger (125%). 
	    (set-background-color "#8a9ff2") ;;;Set colors

	    ))
      (if (string= system-name "WinVM")
	  (progn
	    (print "It's the Windows VM!")
	    (set-face-attribute 'default nil :font "Consolas")
	    (set-background-color "#A9F5A9")
	    ))
     )
;;; else 
;;; Things for terminal mode
	(progn 
	  (print "It's a Terminal"))
)

;;;Common settings--these are mine; you may have something different
(setq make-backup-files nil) ;;; I don't want backup files.

;;; Auto Longline Mode for .txt and .html (blogstuff)
(setq auto-mode-alist (cons '("\.txt" . longlines-mode) auto-mode-alist))
(setq auto-mode-alist (cons '("\.html" . longlines-mode) auto-mode-alist))

;;;Here is where loading extensions and settings go. 
;;;Twittering Mode
(add-to-list 'load-path (concat cloud-dir "/twittering-mode-3.0.0"))
(require 'twittering-mode)


Adding machines is as simple as adding another if-then block.

One question might be, why not put local settings, like colors and fonts, into the local .emacs file. In fact, I had a note in the comments of my dot.emacs file asking that very question–my initial implementation became as much a game of “can I do this” as a practical event. Recently, the wisdom of putting local settings in the common file made sense: my WorkTop hard drive needed to be reimaged. I was able to sett this back up by simply copying the .emacs, as written above, into the proper place. In effect, all my systems also have the same local .emacs file.

I’m not sure if everyone has a need for such a crazy configuration, or uses as many different systems as I do. However, I think it speaks to the power of the EMACS that it can accommodate a shared configuration file.

Posted 2015-03-13 by Mr. Guilt in computers, Geeky

Louisville Mega Cavern   Leave a comment

Ready to GoThis has been a bit of an odd winter. I was able to get out and ride a lot in January–about twice what I did last year. February looked promising, until mid-month, when I wasn’t able to get out and ride one weekend…then the next. When last weekend looked to be the third in a row, I felt I had to do something. I can handle going to suffer on a stationary bike several times a week, and even both days of a weekend once in a while. I couldn’t take three weeks in a row–really a month before the next possible opportunity. I was going MAD!!!!


In the past, I’ve looked into ways to try to drive to better weather. Unfortunately, the climate is such that getting to warmer-enough weather generally requires a drive of several times what I would ride–each way. However, a new option appeared in Louisville in February at the Louisville Mega Cavern that seemed to be a hack. This recreation complex is located in an old mine that stretches under the city, including the zoo. For years, they have had a zip line and a ropes course, along with tram tours of the mine itself. In February of this year, they opened what they describe as the largest indoor bike park in the world.
Cave Entrance 1

It’s billed as a “mountain bike” course, with lots of single track and cross-country paths to follow, which I could handle easily on my cyclocross bike. Other areas were designed to allow mountain bikers to get speed, and perform amazing jumps. The big advantage: the cave is a constant sixty degrees.
Bike Course 2

My ‘cross bike doesn’t have a wheel sensor–I rely exclusively on GPS when I ride it (I also worry, during a race, the sensor would just be a place for mud to accumulate). In a cave, you can’t get GPS signals, so I can’t really give an accurate measure of how big this is. It was easily a mile or so in circumference.
Bike Course 1

On the day I was there, Morpheus bikes was there, giving demos. I had been watching the folks who do gravity jumps, and was curious. So, I decided to try one out. The folks from Morpheus were quite nice, even if they teased me a bit about being the only one there (at the time) in lycra. The setup is completely different–the saddles are quite low, and mostly, you stand to control your body as you run over the ramps. I rode it for about an hour, and got pretty good on the beginner run getting good air and not falling. By the end of my session, I was thinking about adding another discipline to my cycling.
Charles on the Morpheus

While I was acting half (or less) my age, my wife and daughter were doing the Mega Quest ropes course.
Mega Quest

They said they had an awesome time.
Caitlin and Rebecca Before Climbing

We had a great time at the Mega Cavern, and made mental notes for “next time.” While, for me, it was not the long, stead distance I want to prepare for TOSRV, it definitely was a great way to get out of the gym. I also enjoyed the opportunity to challenge myself on different terrain. I’m also grateful that Morpheus Cycles let me try out something new.

Posted 2015-03-05 by Mr. Guilt in Cycling, cyclocross

%d bloggers like this: