Skip to content

Instantly share code, notes, and snippets.

@ruario
ruario / 1-signal-linux-manual-unpack.md
Last active January 17, 2024 21:47
Steps to fetch and run Signal on a Linux desktop that is not deb or apt based
View 1-signal-linux-manual-unpack.md

The following is a quick guide on how to manually download, extract and run Signal for Linux on a non-(deb)apt based distro (and includes a shell script that automates the entire process). This is for use when no suitable, native (re)package is available. It also includes some additional instructions on how to integrate with your desktop environment. Almost any recent distro (configured for desktop use) will likely have all the dependencies already installed—especially so if you already have any other Electron apps or a Chromium based browser installed, since they will require the same things.

[Note: Triple-click to easily select any of the lines below for copy and pasting into the terminal]

Fetch, extract and launch

  • Switch to a directory you think is suitable for housing Signal (for example ~/opt)
mkdir -p ~/opt && cd ~/opt
@ruario
ruario / dtime.sh
Created October 16, 2023 13:29
Show the current Decimal time or convert from "Standard time" to Decimal time
View dtime.sh
#!/bin/sh -eu
# Check for -s as an argument and if so convert decimal time to 'standard time'
if [ "${1-}" = '-s' ]; then
if [ -n "${2-}" ]; then
TIME_IN_SECS="$(echo 864*$(echo "$2" | tr -d :)/10 | bc)"
if [ "$(uname -s)" = Darwin ]; then
date -j -f "%s" "$(expr $(date -j -f '%H:%M:%S' '00:00:00' '+%s') + $TIME_IN_SECS)" '+%H:%M'
exit 0
else
date --date="0 today + $TIME_IN_SECS seconds" '+%H:%M'
@ruario
ruario / register-vivaldi.md
Last active June 22, 2023 22:56
This script simply extracts and registers a Vivaldi Linux deb or rpm package with your Desktop Environment. Not a proper "install" but basically usable as such without the need for an appropriate package manager or root access.
@ruario
ruario / dailycountdown.sh
Last active October 20, 2023 20:32
Script to post every time a further 5% (1h12m) of the day is depleted.
View dailycountdown.sh
#!/bin/sh -eu
# Minutes past the hour that could *potentially* be when a percentage lands, to be used as a
# simple cron tab entry.
#
# 0,12,24,36,48 * * * * [path]/dailycountdown.sh >/dev/null 2>&1
# Define account username
PUBLISHER_USERNAME="dailyprogress@velocipederider.com"
@ruario
ruario / slack-desktop-fetch-extract-snap.md
Last active August 9, 2022 09:22
How to download and install Slack Desktop messaging app on a desktop Linux system without snap support
View slack-desktop-fetch-extract-snap.md
  • Make an install directory somewhere convenient and switch to it
mkdir -p ~/.local/share/slack-desktop
cd ~/.local/share/slack-desktop
  • Fetch the current Slack Desktop snap
@ruario
ruario / totp.sh
Last active March 15, 2023 08:00
This is a short script to display TOTP codes using MinTOTP, with code seeds encrypted with GPG
View totp.sh
#!/usr/bin/env bash
# This is a short script to display TOTP codes using MinTOTP
# <https://github.com/susam/mintotp>
#
# You will need to add your secret keys into an encrypted file (called
# '~/.totp-seeds.dat') formatted like so:
#
# amazon:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
# github:YYY YYY YYY YYY YYYY
# paypal:ZZZZZZZZZZZZZZZZ
@ruario
ruario / authy-fetch-extract-snap.md
Last active December 14, 2023 12:17
How to download and install Twilio Authy on a desktop Linux system without snap support
View authy-fetch-extract-snap.md
  • Make an install directory somewhere convenient and switch to it
mkdir -p ~/.local/share/authy
cd ~/.local/share/authy
  • Fetch the current Authy snap
@ruario
ruario / viv2slk.sh
Last active July 22, 2022 18:42
This script will convert an official Vivaldi Linux package into Slackware package format (it should work on any Linux distro, under macOS or even using BusyBox tools)
View viv2slk.sh
#!/bin/sh -eu
# This script will convert an official Vivaldi Linux package into Slackware
# package format.
#
# To use, just run this script, followed by the name of the Vivaldi package.
#
# Note: Since this script was created with Slackware 15 and above in mind, it
# uses the new 'douninst.sh' script to clear down any proprietary media libs
# fetched by 'update-ffmpeg' during post install.
@ruario
ruario / register-vivaldi.sh
Last active September 26, 2023 10:49
This script allows you to extract and register a Vivaldi Linux deb or rpm package with your Desktop Environment using a unique keyword, to assist with multiple side-by-side "installs".
View register-vivaldi.sh
#!/bin/sh -eu
a=off
if [ "x${1:-}" = "x-n" ] && [ -n "${2:-}" ]; then
n="${2#vivaldi-}"
c="Vivaldi-$n"
a=on
echo "Using the name: vivaldi-$n"
shift 2
fi
if [ -n "${1:-}" ]; then
@ruario
ruario / vivaldi-linux-media-single-user.md
Last active September 20, 2021 14:31
Running the the Vivaldi Linux update-ffmpeg and update-widevine scripts without using root
View vivaldi-linux-media-single-user.md

Intro

The update-ffmpeg and update-widevine scripts included in the Vivaldi install directory are provided to fix situations where proprietary media (AVC/H.264 and AAC) and Widevine (DRM/EME) respectively, are not setup correctly.

These scripts are primarily intended to be run as root (or under sudo) as they create and update files and directories that are root owned. However both support a command line option (--user) that adjusts their installation directories and thus allows them to be run without escalation.

The --user options were made for internal usage, with locally ‘unpacked’ copies of Vivaldi (i.e. not installed). However, it is possible to use them with standard installs (albeit with a little tweaking in the case of update-widevine).

update-ffmpeg