Skip to content

Instantly share code, notes, and snippets.

@ruario
ruario / f2sb.sh
Last active Dec 25, 2018
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
@ruario
ruario / make-install-remove.md
Last active Feb 28, 2019
Uninstalling (removing) a package installed via make install. No make uninstall target required
View make-install-remove.md

Uninstalling a package installed via make install with find

Background

A common mistake for users who are new to Linux (and even a few seasoned users) is to install a package from source without any clear idea about how they will remove it in the future, should they want to.

The classic instructions to install a source package are ./configure && make && make install. This (or slight variants) can work nicely for installation but

@ruario
ruario / make-vivaldi-private-desktop-launcher.sh
Last active Dec 6, 2018
Run this to create a Vivaldi launcher for Linux desktops that always starts in private mode.
View make-vivaldi-private-desktop-launcher.sh
#!/bin/sh
mkdir -p ~/.local/share/applications
cat << END > ~/.local/share/applications/vivaldi-private.desktop
[Desktop Entry]
Version=1.0
Name=Vivaldi (Private)
Exec=vivaldi-stable --incognito
StartupNotify=true
Terminal=false
Icon=vivaldi
@ruario
ruario / widevine-flash_armhf.sh
Last active Jan 29, 2019
Fetches a ChromeOS image for ARM and extracts the Widevine and Flash binaries, saving them in a compressed archive
View widevine-flash_armhf.sh
#!/bin/sh -eu
# Make sure we have wget or curl
available () {
command -v "$1" >/dev/null 2>&1
}
if available wget; then
DL="wget -O-"
DL_SL="wget -qO-"
elif available curl; then
@ruario
ruario / lnx-2.0-proprietary-media-short.md
Last active Nov 7, 2018
Vivaldi 2.0 Linux Proprietary media, quick answer
@ruario
ruario / check-user-namespace.sh
Last active Sep 11, 2018
A bourne shell function to check for the presence of user namespace support in the linux kernel by calling the unshare command to set one up
View check-user-namespace.sh
check-user-namespace () {
if ! command -v unshare >/dev/null 2>&1; then
echo "The unshare command is not available. Install the util-linux package to fix this." >&2
return 2
fi
if unshare -U true >/dev/null 2>&1; then
echo "User namespace support enabled"
return 0
else
echo "User namespace support not enabled"
@ruario
ruario / README.md
Last active Nov 14, 2018
Run Vivaldi Package (rpm, deb or recompressed contents)
View README.md

Run Vivaldi Package

The attached script (rvp.sh) will allow you to directly run a Vivaldi .deb or .rpm package without “installing” it. This works by quickly extracting the package contents into /var/tmp and then executing the binary therein (the extracted files are removed when you close Vivaldi).

Vivaldi is run with a temporary user data (settings) that are specific to that exact version. This is to avoid messing up the main install's user data.

To run Vivaldi in this way, make rvp.sh executable and start a build like so:

./rvp.sh vivaldi-snapshot-1.15.1159.7-1.x86_64.rpm
@ruario
ruario / latest-skype.sh
Last active Nov 30, 2018
This script will find the latest Skype for Linux binary package, download it and repackage it into Slackware format.
View latest-skype.sh
#!/bin/bash
# latest-skype Version 1.1.2
# This script will find the latest Skype binary package, download it and
# repackage it into Slackware format.
# Copyright 2018 Ruari Oedegaard, Oslo, Norway
# All rights reserved.
#
@ruario
ruario / README.md
Last active Nov 7, 2018
HTML5 MP4 (H.264/AAC) video issues with Vivaldi for Linux snapshots
View install-vivaldi-via-repo.sh
sudo add-apt-repository 'deb https://repo.vivaldi.com/stable/deb/ stable main'
wget -qO- https://repo.vivaldi.com/stable/linux_signing_key.pub | sudo apt-key add -
sudo apt update && sudo apt install --install-recommends vivaldi-stable
You can’t perform that action at this time.