Skip to content

Instantly share code, notes, and snippets.

@ruario
ruario / vivaldi-test.md
Last active Aug 29, 2015
Testing the Vivaldi TP on Linux systems
View vivaldi-test.md

Testing the Vivaldi TP on Linux systems where no package is available

Fetch the rpm package:

wget http://vivaldi.com/download/Vivaldi_TP_1.0.83.38-1.x86_64.rpm

Switch to root (use sudo -s, if your system only uses sudo), then extract its core contents into /opt:

tail -c+83823 Vivaldi_TP_1.0.83.38-1.x86_64.rpm | bzcat | ( cd / ; cpio -imd './opt/vivaldi/*' )
exit # To leave the root environment
@ruario
ruario / README.md
Last active Aug 29, 2015
Unpacks a Google Chrome rpm package into a version named directory and creates a startup script that will cause it to save its profile within this directory (Useful for testing).
View README.md

This script converts a Google Chrome rpm package into standalone (portable) format. Usage example:

sh standalone-google-chrome.sh google-chrome-stable_current_x86_64.rpm

When the script is done you will have a suitably version named directory. You can run the copy of Google Chrome stored within it as follows:

google-chrome-stable-41.0.2272.118-1/run &

Copy or move the directory wherever you like.

View tracking-install.md

Locating files that have been installed or updated following software installation:

find `find / -maxdepth 1 -type d -regextype posix-egrep -regex '/(etc|s?bin|lib.*|opt|usr)'` ! -type d -cmin -5 2> /dev/null
View check-vivaldi-version.md

The following will check the Linux Vivaldi (and Chromium) version installed, withouit having to start it up:

grep -Pao 'Chrome/.Vivaldi(.([0-9]+\.){3}[0-9]+){2}' /opt/vivaldi-snapshot/vivaldi-bin | sed -r 's,.*(([0-9]+\.){3}[0-9]+).(([0-9]+\.){3}[0-9]+).*,Vivaldi: \1\nChromium: \3,'

Note: This requires GNU grep compiled with support for Perl regular expressions.

Here is a less fancy version (without the helpful formatting):

strings /opt/vivaldi-snapshot/vivaldi-bin | grep -xA3 Chrome/
@ruario
ruario / rpm4opera
Last active Jan 11, 2016
Converts Opera deb packages into rpm format
View rpm4opera
#!/usr/bin/env bash
available () {
command -v "$1" >/dev/null 2>&1
}
rpmcheck () {
if [ -e "$1" ]; then
echo "$1 is already present, delete it if you want to recreate it"
exit 0
View gist:7bd33e9931018d5b1c65
open -a /Applications/Vivaldi.app --args --profile-directory=profile2
@ruario
ruario / uv.bat
Last active May 26, 2016
Unpacks and installs (in standalone mode) the most recent, manually downloaded Vivaldi Windows installer from your Downloads folder, into a version numbered sub-folder of your desktop
View uv.bat
@ECHO OFF
SET INSTALLPATH=%HOMEPATH%\Desktop\Vivaldi-Builds
SET DOWNLOADPATH=%HOMEPATH%\Downloads
FOR /F %%i IN ('dir /b /t:w /o-d "%DOWNLOADPATH%"\Vivaldi*.exe') DO (
SET PKG=%%i
GOTO :CONTINUE
)
ECHO No Vivaldi installers in Downloads
@ruario
ruario / 7x.sh
Last active Dec 6, 2016
Shell script that wraps the 7-Zip commands and makes them work like a normal UNIX compressor in streaming mode for multithreaded XZ compression
View 7x.sh
#!/bin/sh
# https://web.archive.org/web/20140301113249/http://my.opera.com/ruario/blog/2013/01/15/faster-xz-compression
case $1 in
-d) 7za e -si -so -txz ;;
*) 7za a /dev/null -si -so -txz ;;
esac 2> /dev/null
@ruario
ruario / README.md
Last active Mar 7, 2017
Extracts an Opera Debian package and installs it into /usr/local. An uninstall script is also created and installed as well. Upgrades work if you used this script to install a previous version. Completely unofficial and unsupported by Opera Software.
View README.md

Disclaimer: I wrote this script for my own personal usage. It is not officially supported by Opera Software.

Whilst Opera currently only provide .deb packages, it is possible to install Opera on different distros. This install script automates the process.

If you don't already have the script, fetch it like so:

git clone https://gist.github.com/ace4fb780216aa28d922.git

To install the latest stable release, issue:

@ruario
ruario / create-ffmpeg-opera.sh
Last active Apr 28, 2017
Creates an installable package containing H.264 and MP3 support libraries for Opera on Linux
View create-ffmpeg-opera.sh
#!/bin/sh
#
# Creates an installable package containing H.264 and MP3 support
# libraries for Opera on Linux
#
# Note: You will need a suitable development environment to run this
# script successfully. Make sure the following is installed before
# proceeding:
#
# * autoconf