Skip to content

Instantly share code, notes, and snippets.

@ruario
ruario / slack-desktop-fetch-extract-snap.md
Last active Aug 9, 2022
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 Mar 8, 2022
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 encyrpted 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 Dec 1, 2022
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 Jul 22, 2022
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-named-vivaldi-build.sh
Last active Jul 11, 2020
This script allows you to extract and register with your Desktop Environment a Vivaldi Linux deb build with a unique keyword, to assist with multiple side-by-side installs
View register-named-vivaldi-build.sh
#!/bin/sh -eu
if [ "x${1:-}" = "x-n" ] && [ -n "${2:-}" ]; then
name="${2#vivaldi-}"
class="Vivaldi-$name"
echo "Using the name: vivaldi-$name"
shift 2
else
echo -e "You must supply a name like so:\n\n $0 -n keyword\n" >&2
exit 1
fi
@ruario
ruario / vivaldi-linux-media-single-user.md
Last active Sep 20, 2021
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

@ruario
ruario / make_vivaldi_sbo_pkg.sh
Last active Aug 15, 2022
A script to simplify maintaining the SBo version of Vivaldi for Slackware
View make_vivaldi_sbo_pkg.sh
#!/bin/sh -eu
TMP="${TMP:-/tmp}"
REPACKDIR="$TMP/vivaldi-sbo-tar/vivaldi"
mkdir -p "$REPACKDIR"
cd "$REPACKDIR"
# Find out Vivaldi stable version and calculate md5sums
VERSION="${VERSION:-$(wget -qO- http://repo.vivaldi.com/archive/deb/dists/stable/main/binary-amd64/Packages.gz | gzip -d | grep -A6 -x 'Package: vivaldi-stable' | sed -n '/Version/s/.* //p' | sort -t. -k 1,1n -k 2,2n -k 3,3n -k 4,4n | tail -n 1 | cut -d- -f1)}"
@ruario
ruario / chrome-ua-test.md
Last active Feb 6, 2020
Launching Google Chrome with a Vivaldi User Agent
View chrome-ua-test.md

The following will allow you to test Chrome with a Vivaldi user agent. Shutdown Chrome and start a Terminal (or cmd.exe on Windows), then paste in the code that is relevant for your platform and press “Enter”–you can triple-click to select an entire line.

Testing with Chrome

NOTE: There is little point testing in Vivaldi because old versions already had workarounds for these specific issues and from 2.10 onwards we use a Chrome User Agent string.

Windows

"%PROGRAMFILES(X86)%\Google\Chrome\Application\chrome.exe" --user-agent="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.94 Safari/537.36 Vivaldi/2.10.1745.21"
@ruario
ruario / macos-private.md
Last active Dec 6, 2021
A small App that starts Vivaldi for macOS as a Private Window
View macos-private.md

Vivaldi Private Window Launcher for macOS

The following commands will produce a small application that allows you to launch Vivaldi in Private mode on a Mac.

Start Terminal paste in the the following code (pressing Enter when done):

mkdir -p Vivaldi\ Private.app/Contents/MacOS
printf '#!/bin/sh\nopen -a Vivaldi.app --args --incognito' > Vivaldi\ Private.app/Contents/MacOS/Vivaldi\ Private
chmod +x Vivaldi\ Private.app/Contents/MacOS/Vivaldi\ Private
@ruario
ruario / f2sb.sh
Last active Oct 18, 2019
A script for those who "Forgot to make a SlackBuild". Following a manual install (e.g. `make install`), use this script to make a Slackware package.
View f2sb.sh
#!/bin/sh -eu
#
# This script allows you to create a Slackware package from software you
# previously installed manually (e.g. via `make install`).
#
# Usage:
#
# ./script name-version /path/to/reference/file [seconds]
#
# Provide the name and version of the package, path to one file that forms