Skip to content

Instantly share code, notes, and snippets.

@ruario
ruario / README.md
Last active June 9, 2022 12:30
Unpacks an Opera Debian package into a similarly named directory and creates a startup script that will cause Opera to save its profile within this directory (Useful for USB installs). Completely unofficial and unsupported.

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

This script converts an Opera Debian package into standalone (portable) format. If you do not already have it, fetch it as follows:

git clone https://gist.github.com/8416e36372f1a976a713.git

Now use the script to convert an Opera package as follows:

sh standalone-opera.sh opera-developer_27.0.1670.0_amd64.deb
@ruario
ruario / pkgtrack
Last active January 29, 2019 15:06
#!/bin/sh
#
# Version: 1.2
#
# This script provides a method for tracking software installed from
# source. Run it as follows for more information:
#
# pkgtrack -h
#
# Copyright 2018 Ruari Odegaard, Oslo, Norway
@ruario
ruario / README.md
Last active May 20, 2021 17:02
This script provides a method for creating generic (cross-distro), installable, binary packages. The created packages include a log that makes uninstall easy.

Createpkg

Intro

This script provides a simple method for tracking software that you have built from source, or binaries that you want to repackage from another distribution. It also simplifies transferring the software to other machines for install or backup. It works as a nice secondary package management tool, without the need to work with complex, distro specific, build tools.

@ruario
ruario / README.md
Last active March 7, 2017 05:32
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.

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 / extract-air-files.md
Created June 2, 2014 07:58
How to extract the files from within the Linux Adobe Air Installer

Find the location of the LZMA compressed tar:

LANG=C grep -abom1 ]$'\000\000'....$'\377\377\377\377\377\377' AdobeAIRInstaller.bin
6704:]�������

Add 1 to this value (e.g. 6705).

Extract the contents of this tar:

tail -c+6705 AdobeAIRInstaller.bin | xz -qqd | tar -xf- --xform='s,^./build,Adobe_AIR_Files,'

@ruario
ruario / extract-acrobat-files.md
Last active August 29, 2015 14:02
How to extract the files from within the Linux Adobe Reader (Acrobat) Installer

When making native Linux packages for Adobe Reader (Acrobat) it is better to use the installer as a source, since it is approximately 13.5 Mb smaller due to use of LZMA compression (the same type of high compression used in 7z and xz files).

The .bin actually has a .tar.lzma archive inside it with the exact same files as the .tar.bz2 that is more commonly used as a source package. The contents of this compressed tar can be extracted using tail, XZ-Utils and tar.

Find the location of the LZMA compressed tar:

$ LANG=C grep -abom1 ]$'\000\000'....$'\377\377\377\377\377\377' AdbeRdr9.5.5-1_i486linux_enu.bin
6888:]�������

Add 1 to this value (e.g. 6889).

@ruario
ruario / manual-install-of-opera.md
Last active September 7, 2018 11:49
How to install Opera developer for Linux on distributions other than Debian, Ubuntu or derivatives
@ruario
ruario / one-shot-sftp.md
Last active January 19, 2022 17:22
How to upload a file(s), to a remote location in one go with sftp. Useful for automation.

Normally if you want to quickly send a file to a remote directory on an ssh server as a one liner or within a script, the following would suffice:

scp file server:path

Occasionally, you may come across a server that only has sftp enabled and not scp. For example if the OpenSSH server you were connecting to was configured as follows:

Subsystem sftp internal-sftp
@ruario
ruario / small-slackware.md
Last active February 26, 2024 02:10
A short guide to quickly setting up a small Slackware install

Setting up a "small" Slackware install

Intro

Before you do this, reconsider if it is really needed. More often than not, it isn't. This is why.

A common reason for attempting a minimal install is an expectation that Slackware will run faster. This is not true. Some example, (IMHO) valid, reasons for stripping back the install include:

  • Installing on a device with limited disk space, where it is hard to add additional storage
  • A setup where there is an ongoing cost to rent disk space (e.g. a Virtual Private Server)
@ruario
ruario / mac-activation-order-tab-cycling.md
Created October 8, 2014 05:49
Start Opera for Mac with activation order tab cycling

Start a terminal and launch Opera via the following command:

open -a /Applications/Opera\ Beta.app --args --with-feature:activation-order-tab-cycling=true

To make that permanent, create a small launcher application. To do this start AppleScript Editor and then choose "File → New (⌘N)" and enter this command:

do shell script "open -a /Applications/Opera\\ Beta.app --args --with-feature:activation-order-tab-cycling=true"

Now "File → Save (⌘S)" as "File format: Application" in a suitable location (/Applications perhaps?). Finally add this launcher application to your Dock and use it to start Opera.