Delete current track in mpv.

I use mpv to listen to music, which doesn’t have a built-in option to delete the current track. This post shows how to add a input hook and keep a list of deletion candidates with mplayer, but I wanted the ability to delete a track and recover it, if possible. See bamos/dotfiles for the latest version, but below shows the...   read more

16 Feb 2014 | Linux

Website to wrap long lines in Fortran.

Fortran programs may use a large array copied in from another source. One problem in doing this is that fortran requires wrapped lines to end with the & character before continuing on the next line. Instead of doing this manually, this (simple) website will automatically break lines and add & characters. The site is open-sourced at bamos/fortran-wrap. For example: REAL(KIND=R8)::...   read more

08 Feb 2014 | Fortran

Email broken links daily with Python 3 in Linux.

Broken links are an annoyance on many websites, including this blog. To fix this, tools such as linkchecker are helpful to locate broken links. Using linkchecker on my website with --no-warnings and --no-status still results in 97 warnings and 11 errors, making the results very difficult to glance through! Many of the 97 warnings were 8 lines for a denial...   read more

06 Feb 2014 | Python, Linux

inf - shell convenience function for infinite loops

When using my shell, I often want to loop a command until I interactively want to stop, such as calling ps to check the status of a program, looping a song with mplayer, or to continuously check some other status. watch executes a program periodically, but has the drawback of using the entire terminal and only showing the result of...   read more

05 Feb 2014 | Bash

Python cache decorator with timeout.

I’ve written a Python application, bamos/picasa-map that heavily uses the Picasa REST API to load a user’s albums and locations, using Python’s urllib.request library for each request. These requests cause small-scale deployments of my application to take a few seconds to load, and I wanted to cache the results so the page will load faster. This StackOverflow answer gives a...   read more

04 Feb 2014 | Python

Older Posts