I like to set up a standardised directory structure for RStudio projects. The idea came from here. In brief, the structure is: My typical workflow is therefore to: So far, so good. However, this process is a bit tedious. I find it irritating to open up RStudio (which opens up a previous project by default) […]
Tag: tftb
Over and Over: quick ways to reuse handy shell one-liners
There are a few one-liners that I use in the shell to do some really nifty stuff. I struggle to quickly find and reuse these and asked for a solution on Mastodon. A handy one-liner might be something like (taken from here): This converts all the flac files in subfolders into mp3 files. Obviously, we […]
Tips From The Blog XVIII: upgrading a Music/iTunes library
Niche tech tips are the cornerstone of this website, and here is another. How to upgrade an iTunes/Music library whilst maintaining the database. I know everyone streams music these days – hence this is likely a very niche tech tip – but I still maintain a large music database on a server. The data in […]
Tips From The Blog XVII: determining playback speed of a video
Generating movie files for publication can be a bit tricky. We have a protocol for making them for microscopy data, which simplifies things. However, we recently got this question from a journal: please state the playback speed of each movie file How can we do this? What information is needed for movie files? Usually movies […]
Tips From The Blog XVI: fast check of two directories
Here is a quick method for checking parity between two directories. Let’s say we have two directories dir1 and dir2. They are large and have thousands of files and subdirectories. How can we check that they have the same contents? I found myself in this situation recently during a server migration. Method 1: rsync To […]
Convertible: using ffmpeg to convert audio files
A quick tech tip. I usually use Audacity for converting audio files and I have a few simple macros set up in there to make life easy. I had some opus music files which do not play in Apple’s Music app and therefore needed converting to MP3 format. Annoyingly, Audacity 3.1.2 on macOS does not […]
Tips from the Blog XV: locating the php.ini file for WordPress on Raspberry Pi
If I struggle to find the answer to something, it must be worth a post to help out others. So, here’s where to find the php.ini file on a standard WordPress install on Raspberry Pi. I installed a LAMP stack and WordPress on a Raspberry Pi following these excellent instructions. The aim was to import […]
Tips From The Blog XIV: embedded file locations in an Adobe Illustrator file
I was working on a figure in Adobe Illustrator today. The ai file had 32 embedded TIFF files (we tend to embed images rather than linking them for portability reasons). I wanted to change all of the images, but to do this I needed to know where the originals were. Clicking on the file shows […]
Tips From The Blog XIII: siunitx, Helvetica and LaTeX
I searched several times in vain to solve this problem. After finding a solution, I thought i’d put it up here. The problem Formatting of units using siunitx in LaTeX does not match the typeface of the body text. We like to use the helvet package to get a close approximation to Helvetica in LaTeX. […]
Find The Answer Within: using grep to find lost code
A short tech-tip this week. How can you find a line of code somewhere on your computer? I often find that I need to write a line of code and I can’t remember the exact syntax. To add to the frustration, I can remember writing a similar line before, but can’t remember in which file […]