Category: Geek

Working with Taskpaper files in vim

I’ve been experimenting with Taskpaper for lists over the last couple of weeks, and really like the flexibility. All of my lists are stored as text files in Dropbox, which makes it easy to use/update lists from anything or anywhere. On my iPhone I use Drafts to quickly add to the task lists and Editorial to work with the tasks.… Read more →

Using a Here Document with bash and MySQL

This past week I worked on a bash script to create some input files from a MySQL database. My problem was trying to use multiple line MySQL statements, which was messing everything up. The solution was to use bash’s Here Documents. It’s a way to direct lines into a command. For me, the command looked like this: mysql DBNAME <<EOF… Read more →

Resetting a daily taskpaper list

I have a couple daily taskpaper lists that by the end of the have an @done on each line and I need to reset it for the next day. Instead of trying to do a search and replace everyday, I added a bash alias to .bash_profile (or .bashrc): alias rst="sed -i '' 's/@done\(.*\)//g'" The extra ” after the -i is… Read more →

Saving bash shell history for multiple shells

The history from the commands typed into bash are very useful from time to time, especially when I think “Oh, I’ll remember that command next time I need it”, and then I don’t. The problem with bash’s history are twofold: It only saves history when the terminal exits cleanly, so if your connection drops or you have to kill the… Read more →

Markdown to presentation

Since my preferred interface is the command line, yesterday I was thinking how cool it would be to knock out a presentation from Markdown. I could work on the content, and not get distracted by the interface. Luckily, I didn’t have to look any further than Pandoc. Pandoc can take a multitude of formats and convert to other formats. For… Read more →

Jumping to multiple hosts with ssh behind a gateway

At home I have several hosts that I need to ssh into at various times. Unfortunately, since IPv6 is widely deployed, I am stuck sshing into one host that is publically accessible, and from there sshing into other hosts. Cumbersome to say the least, but it does look cool when I’m showing it off. Anyway, you can automate the connection… Read more →

Resetting a .taskpaper file

I use a couple of .taskpaper files for checklists of things that need to be done every day. In it, after a task is completed the task gets an @done tag added. But the next day I want to start fresh. I could do a find/replace, but sed at the command line works better: alias rst="sed -i 's/@done\(.*\)//'" Adding the… Read more →

My Newsbeuter config file

And here’s my config file that I use with Newsbeuter. article-sort-order date asc auto-reload yes reload-time 60 show-read-feeds no show-read-articles no mark-as-read-on-hover no bookmark-cmd "~/Development/bookmark" bookmark-autopilot no save-path "~/Documents/Research" Read more →

Using RSS like it’s 1990

I’m a big console fan, preferring to do as much work as possible from the command line. So it shouldn’t be surprised that I also use RSS even as others have abandoned it for things like Twitter. I prefer to supplement my news feeds with Twitter and not replace it. Since the demise of Google Reader, I’ve settled on Feedly… Read more →

Publishing using Sphinx to Github

I’ve been playing around with Sphinx as a digital publishing tool. It can take multiple files written in reStructuredText (similar to Markdown, which is plain text with minimal markup) and create not only a website, but also PDFs and ePubs (and more, list is on the website). An example is the Sublime Text Unofficial Documentation. If you click on the… Read more →