Showing headlines posted by eldersnake

« Previous ( 1 2 3 4 5 6 ... 7 ) Next »

Scottish Country Dancing stats

My wife has been in the same Scottish Country Dancing group for many years, and back in 2005 she began keeping a record of the dances done at each meeting. She lists a fair bit of information in her "dances done" spreadsheet.

She recently asked me "Would it be possible to get a summary by dance title? For each title I'd like the total number of times we danced it, and also the number of years in which we did that dance."

Well, it could be done with a spreadsheet pivot table and a function or two (after data cleaning, see below), but to me it sounded like a job for the command line. Quick, Robin! To the Bat-shell!

A script to log what my GPS tells me

I carry a Garmin Etrex 10 when I go bug-collecting. It's a handheld GPS receiver without many frills, and I only use it to record the latitude and longitude of each of my collecting sites as a waypoint. At the start of a field trip I delete all previous waypoints. When I do this, the trip's waypoints are then serially numbered from 001 and stored in the Etrex 10 in a file with a name like Waypoints_14-NOV-16.gpx. When I get home [...] I then use a keyboard shortcut to launch my gpslogger script, which is explained in this article.

Eek! My rounding is biased!

I've written several BASH scripts that use GNU AWK's printf function to round off decimal numbers. Now I've learned that the rounding is biased, and I need to re-do the scripts.

Redshift functionality on Fedora 25 (GNOME + Wayland). Yes, it's possible!

For those who can't live without screen colour shifting technology such as Redshift or f.lux, myself being one of them, using Wayland did pose the challenge of having these existing tools not working with the Xorg replacement. Thankfully, all is not lost and it is possible even right now. Thanks to a copr repo, it's particularly easy on Fedora 25.

Give your eyes a break in the evenings with Redshift

Eyes hurting at night from the glare of your screen? Perhaps it's even affecting your sleep? Then maybe you should give Redshift a try, a program similar to Twilight on Android and inspired by the likes of f.lux.

Sync your Fitbit on Linux with Galileo

If you have a Fitbit fitness device and wish to sync your device using the wireless dongle on your Linux machine, the good news is it is possible with the Bluetooth-based Fitbit devices, thanks to a small Python utility called Galileo. Note: you will need a bit of terminal-foo, but to be honest, I found the little program just as reliable if not more reliable and hassle-free than the official Fitbit apps on Android and Windows! In this short article we'll look at how to get it.

OpenMW 0.40 - Elder Scrolls III: Morrowind on Linux

The Elder Scrolls III: Morrowind is one of my personal favourite games of all time. Years ago I would have happily run the game in Linux, but the only real way to do so was through WINE. Thanks to OpenMW, a totally rewritten and open source engine for Morrowind, it is now very much possible to have a near complete Morrowind experience, completely natively.

Scripting a DNA Sequence Viewer

SANITY WARNING: Please don't read this article unless you're a compulsive shell scripter, like me. Seriously. There are some excellent FOSS sequence viewers in the distro repositories, with great GUIs and lots of features. Why would you want to build a less capable viewer that only works in a terminal?

Still with me? OK, the script explained here is called 'DNA' and relies on up-to-date GNU utilities (e.g. GNU AWK) and BASH...

Netflix on Firefox for Linux

If you're a Firefox user and you're a little fed up with going to Google Chrome every time in order to watch Netflix on your Linux machine, the good news is since Firefox 49 landed, HTML5 DRM (through the Google Widevine CDM (Content Decryption Manager) plugin) is now supported. Services that use DRM for HTML5 media should now just work, such as Amazon Prime Video. Unfortunately, the Netflix crew haven't 'flicked a switch' yet behind the scenes for Firefox on Linux, meaning if you run Netflix in the Mozilla browser at the moment, you'll likely just come across the old Silverlight error page. But there is a workaround.

Hunting gremlin characters

When cleaning UTF-8 text files I sometimes come across invisible characters that I call 'gremlins'.

These aren't the usual non-printing characters, like whitespace and (horizontal) tab, which are non-printing characters I expect to find in the plain text files I work with. Gremlins are weird things like 'vertical tab', 'device control 2' and 'soft hyphen'. I don't know how they got into the files, but I want to get rid of them.

Teach your Grandmother to write scripts

Regular readers of The Linux Rain will know that I'm keen on writing simple shell scripts to automate repetitive and complicated tasks. Some of those scripts are for terminal use, others for GUI applications. They all have this in common: they reduce lots of keystrokes and mouse-clicks to a single keyboard shortcut or a single click (on an icon or a menu item). Power users in the corporate world and sysadmins use scripts to save time and effort. Seniors like me do it to save effort and because it's a simpler way to interact with a computer, and we really like keeping things simple.

Finding unmatched braces (brackets)

Recently I was checking for unmatched braces in a big text file with nearly half a million lines (300+ MB). Was there a closing brace for every opening brace?

The text file was called 'beetle' and was actually a tab-separated table with each line divided into 77 fields. What I wanted to do was find any lines in which unmatched braces appeared within fields. Here's the command I used...

Snaps - A Good Way to Test the Latest Apps

As of the latest Ubuntu 16.04 LTS release, the core program 'snapd' is included out of the box, allowing you to install 'Snaps' right away. Now, as one would expect, there is and will continue to be some controversy about the nature of a new software packaging system and it's potential uses in the future. I don't really wish to go too much into that, as there is plenty of discussions out there in the Linux side of the interwebs, other than the purpose of this article is to state that if nothing else, Snaps are a good way to test different versions (stable, bleeding edge etc) of software.

Proofreading for illusions with grep and AWK

  • The Linux Rain; By Bob Mesibov (Posted by eldersnake on Jun 18, 2016 9:25 AM EDT)
  • Story Type: Tutorial; Groups: Linux
Lexical illusions are very hard to find when proofreading. The most common lexical illusion is a duplicated word, as in this well-known example: "A lexical illusion: many people are not aware that the the brain will automatically ignore a second instance of the word 'the' when it starts a new line." But if you let grep and AWK do the proofreading — problem solved!

Transposing rows and columns: 3 methods

Swapping the rows and columns in a table on the command line would seem to be a fairly easy thing to do [...] Transposing rows and columns is indeed easy if you have the GNU datamash utility on your system [...] I wrote 'trans' as throwaway code for transposing my own tables. It could be extended so that argument 2 specifies the input column separator, and argument 3 a different column separator for the output. There are other ways to swap rows and columns in tables, for example using Perl, but for the time being I'm happy with the script!

Got tearing with proprietary NVIDIA? Try this.

If you're using a reasonably modern NVIDIA graphics card on your Linux box with the proprietary driver, there's a fair chance you may encounter that nasty thing called 'screen tearing'. There is a little setting worth trying in NVIDIA's blob driver called 'ForceCompositionPipeline' that can severely reduce tearing to a minimum, perhaps even completely. Here's how to do it.

Distro Wars: It's All Linux

This is likely a topic covered plenty of times, and as such I won't make this a too in-depth article, but I feel it's something always worth reiterating and remembering that no matter what distribution of Linux (or GNU/Linux if you prefer) you use... it's all Linux.

Steel, Password Managing the CLI Way

One thing that's probably obvious to anyone who's read more than a few Linux Rain articles is that we appreciate the CLI (command-line interface). [...] the CLI will always have a place for those who feel comfortable using it and appreciate the power and lightweight nature of the interface. So if you're looking for a password manager for the command-line, Steel is one such example we're taking a look at today.

Installing Firestorm (Second Life viewer) for Linux

Unless you've lived under a virtual rock since 2003, you have probably heard of Linden Lab's baby, Second Life at some point. The online virtual world, where you can literally pretty much do anything, might not be at the peak popularity it once experienced but there is still plenty going on. If you're a Second Life user (or resident, as they like to put it) or looking to become one, here's how to install a Linux client.

Keeping emails as text files: 2 scripts

Most people store and organise their personal emails as individual files (messages) in folders. Those folders might be on a webmail company's servers, or in a mail client program on the user's personal computer. In both cases the emails are probably in a special email format.

I'm horribly old-fashioned. I store my emails in plain text files, one long file for each correspondent, in chronological order. To make this easier I use the two shell scripts described in this article.

« Previous ( 1 2 3 4 5 6 ... 7 ) Next »