Slack a Day

Computers, technology, how-tos

Monday, May 01, 2017

DrupalCon Baltimore 2017: Avoid DEEP HURTING! Deployment beyond git

Labels: ,

Saturday, June 19, 2010

Blog from the command line

GoogleCL allows you to post to your Blogger blog from the command line. To install:
  1. Install Python gdata libraries. This entails downloading, untarring, and sudo python
  2. Install GoogleCL. Same as above.
  3. Copy googlecl-0.9.5/build/scripts-2.6/google (version numbers subject to change) to /usr/local/bin or anywhere else in you PATH.
Now you can open a terminal and run a command like:

google blogger post --tags "online, shell" --title "Frist post using GoogleCL" "Can you believe I'm posting this from the command line?"

Or write your post in a text editor, saving it as ~/tmp/post.html, then:

google blogger post --tags "online, shell" --title "Blog from the command line" ~/tmp/post.html

Labels: ,

Thursday, June 10, 2010

Writing a TiddlyWiki plugin

It was easier than I thought to write a simple TiddlyWiki plugin. I wanted to create a shortcut for the "Close all" button on the sidebar.
  1. Hack (a backup of) the core TiddlyWiki html or javascript to make it do what you want. Take note of the functions or objects you edited.
  2. Copy the plugin template [].
  3. Paste the template into a new tiddler in a stock TiddlyWiki html (not the one you edited).
  4. File out the boilerplate stuff like the plugin's name and author.
  5. Override the functions or objects you noted in step 1 by writing code in !Code section of the tiddler.
  6. Add "systemConfig" to the tag field of the tiddler and save the tiddler.
  7. Save changes to the TiddlyWiki and refresh.
For your convenience, here's the plugin template. Be sure to replace SamplePlugin with the name of your plugin.

!Configuration Options
!Revision History
!!v<#.#> ()
* <...>
!To Do
if(!version.extensions.SamplePlugin) { //# ensure that the plugin is only installed once
version.extensions.SamplePlugin = { installed: true };

if(!config.extensions) { config.extensions = {}; } //# obsolete from v2.4.2

config.extensions.SamplePlugin = {
sampleFunction: function() {
/* ... */

config.macros.SampleMacro = {
handler: function(place, macroName, params, wikifier, paramString, tiddler) {
/* ... */

} //# end of "install only once"

Labels: ,

Wednesday, May 19, 2010

Upgrading X11 Server on Mac OS X 10.5.8 Leopard

Some programs found in the MacPorts repository use X. If you followed the default directions on the site as I did and decided to use Apple's X instead of MacPort's, your X is outdated and may cause some problems on those MacPorts installed apps. I got the upgrade in an easy-to-use installer by going to, clicking on Latest Release, and downloading the dmg (X11-2.5.0.dmg at the time of this writing).

Be warned that an Apple update will clobber this install. Therefore, you should get the latest X from and install it after an Apple update.


My gitk (which uses X) stopped working after the update. I'm not sure if it was the update as I forgot if I ever ran it successfully before the update. Fix: I simply went to the git-osx-installer site on Google Code and downloaded the latest installer under Featured downloads on the sidebar.


Wednesday, March 17, 2010

Using Firefox to view man pages on OS X


  • Apache web server running
  • perl

Download man2html

Mac version I used

Install it

cd to the directory containing contents of tarball.
sudo perl

Put man.cgi into local cgi-bin

Mac: cp man.cgi /Library/WebServer/CGI-Executables/

Configure man.cgi

First line:

Around line 126, add paths to your man pages, including programs you've installed (usually in /usr/local/), e.g. I've installed git:

@ManPath = qw(

Configure Apache

In /etc/apache2/httpd.conf:

<Directory "/Library/WebServer/CGI-Executables">
AllowOverride None
Options ExecCGI
Order allow,deny
Allow from all

Restart the server to reload the httpd.conf.

Configure Firefox


Go to Bookmarks > Organize Bookmarks;
Open a bookmark folder then right-click and chose New Bookmark;
Name the new bookmark man;
In the Location field paste this line:


In the Keyword field type man;
Click Add.

Done. Sweet.

To view a man page, just type in the URL bar of Firefox:
man some-command

For example:
man ls


Saturday, July 22, 2006


GeoShell is an amazing minimalistic Windows shell replacement. No more stupid taskbar. Just about everything can be keyboard shortcutted. I've set it up so my desktop is basically just a wallpaper. The main keys I use are alt-shift-F for task switcher and alt-shift-S for my customized start menu. I'm using the geoXWM plugin to use virtual desktops like in most Linux window managers.

So happy. My efficiency: up 25%, productivity: -300%. I waste so much time mucking around with my UI.

Wednesday, July 05, 2006

The Yuppies are coming

A poetic post from slashdot comparing Macs, *nix, and Windows to real-world locales:

The yuppies are coming

(Score:5, Insightful)
by BlueStraggler (765543) on Monday July 03, @04:15PM (#15653193)

What's really happening is that Mac "nerds" are becoming versed enough in Unixisms because of OS X that they can take a walk on the wild side with Linux and not get completely freaked out. They have just enough street smarts to take a walk through the OS inner city with the tough nerds, and not get shot or beat up. And they've discovered that, hey, wow there's a lot of cool shit happening on the mean streets of Linuxville.

But what they don't know is that downtown Linuxville hasn't been a rough a place for a few years now. It still clings to its tough reputation, but it's all college kids and coffee bars now. The place is gentrifying, and has a bit of that yuppie stench to it these days. It's not yet all Wonderbread and Wal-mart, like Windowsland, up the highway, but the Windowsland folks are moving in, and it's starting to get that feel.

The old-timers who gave Linux the frightening reputation that it carries, have long since settled down, had kids, and moved out to the leafy lanes and plush lawns of Mactown, to get away from the plastic Windowsland people. As a result, the Mactown folks have realized those Linux guys aren't so scary after all, beards and sandles notwithstanding. Maybe, some of the Mactown folks think, we could get a condo in Linuxville, and try some of that inner city living. Just on weekends for a start.

So they get a luxury condo in Linuxville, right on Ubuntu Street, which was built by a big-name property developer who saw that all the starving artists were living in the area, building cool lofts and studios from the abandoned tenements and factories of old Unixville. So he bottled up that artsy mojo and built a condo development with new appliances, and hardwood floors, and put in a Starbucks on the ground floor, and marketed it heavily to Mactown and Windowsland people looking for a change. Come to Linuxville! Not as scary as you think! But every bit as edgy! Now with taskbars! Sometimes you get contemptuous looks from the mean looking men who still hang out on Slackware Road, but it's best not to go down there if you can help it. If you can avoid them (and ignore the snotty punks on Gentoo Avenue), then it's all terrifically edgy and artsy, and just so-o-o-o nerdy cool in that certain je-ne-sais-quoi kind of way. It feels like they're right on the cutting edge, where the culture is created, where everything happens, just like they read in Wired Magazine in 1996.