Skip to content

Instantly share code, notes, and snippets.

@ruario
ruario / README.md
Last active Aug 29, 2015
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.
View README.md

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
View pkgtrack
#!/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
This script provides a method for creating generic (cross-distro), installable, binary packages. The created packages include a log that makes uninstall easy.
View README.md

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

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 Aug 29, 2015
How to extract the files from within the Linux Adobe Reader (Acrobat) Installer
View extract-acrobat-files.md

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 Sep 7, 2018
How to install Opera developer for Linux on distributions other than Debian, Ubuntu or derivatives
@ruario
ruario / one-shot-sftp.md
Last active Aug 27, 2019
How to upload a file(s), to a remote location in one go with sftp. Useful for automation.
View one-shot-sftp.md

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 Dec 24, 2020
A short guide to quickly setting up a small Slackware install
View small-slackware.md

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 Oct 8, 2014
Start Opera for Mac with activation order tab cycling
View mac-activation-order-tab-cycling.md

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.