Skip to content

Instantly share code, notes, and snippets.

@bmaupin
bmaupin / install-virtualbox.sh
Last active November 21, 2023 13:04
Install VirtualBox 5 in Ubuntu/Debian
# https://www.virtualbox.org/wiki/Linux_Downloads#Debian-basedLinuxdistributions
wget -q https://www.virtualbox.org/download/oracle_vbox.asc -O- | sudo apt-key add -
sudo sh -c 'echo "deb http://download.virtualbox.org/virtualbox/debian `lsb_release -c | awk '"'"'{print $2}'"'"'` contrib" > /etc/apt/sources.list.d/virtualbox.list'
sudo apt-get update
sudo apt-get install dkms virtualbox-5.1
@bmaupin
bmaupin / install-apktool.sh
Last active July 22, 2025 01:12
Install apktool in Linux
# ⚠ NOTE: if you're using the latest version of ubuntu, now you can just do:
# sudo apt install apktool
# Get latest version from https://bitbucket.org/iBotPeaches/apktool/downloads
export apktool_version=2.3.1
sudo -E sh -c 'wget https://bitbucket.org/iBotPeaches/apktool/downloads/apktool_$apktool_version.jar -O /usr/local/bin/apktool.jar'
sudo chmod +r /usr/local/bin/apktool.jar
sudo sh -c 'wget https://raw.githubusercontent.com/iBotPeaches/Apktool/master/scripts/linux/apktool -O /usr/local/bin/apktool'
sudo chmod +x /usr/local/bin/apktool
# Patch based on info from here:
# http://lists.freebsd.org/pipermail/freebsd-questions/2011-February/227044.html
--- configure.dist 2011-04-06 10:30:07.000000000 -0500
+++ configure 2011-04-06 11:25:17.000000000 -0500
@@ -11119,7 +11119,7 @@
# in gssapi\rfckrb5.h
#
if test "$gssapi" != "no"; then
- if test "$gss_impl" = "cybersafe" -o "$gss_impl" = "cybersafe03"; then
@bmaupin
bmaupin / sort-logs-date.py
Created January 19, 2016 19:05
Sort logs by /bin/date output
text = '''Tue Jan 19 14:00:42 EST 2016
real 0m2.491s
Sun Jan 17 21:46:41 EST 2016
real 0m15.013s
Mon Jan 18 00:49:33 EST 2016
real 0m15.039s
Sun Jan 17 23:49:16 EST 2016
real 0m15.024s
Mon Jan 18 02:50:38 EST 2016
real 0m15.020s
@bmaupin
bmaupin / build-reicast.sh
Last active June 21, 2020 16:33
Build Reicast emulator on Ubuntu/Debian
# NOTE: These instructions are old and may be out of date. A better alternative to compiling Reicast manually may be to use RetroArch with the Flycast core (https://www.retroarch.com/)
# Install prerequisites
sudo apt-get -y install build-essential libasound2 libasound2-dev libegl1-mesa-dev libgl1-mesa-dev libgles2-mesa-dev mesa-common-dev
# Build Reicast
git clone https://github.com/reicast/reicast-emulator.git
cd reicast-emulator/shell/linux
make
# Run Reicast
@bmaupin
bmaupin / install-virtualbox-extension.sh
Created January 22, 2016 15:02
Install latest version of VirtualBox Extension Pack
# Install VirtualBox Extension Pack
virtualbox_version=`curl -s http://download.virtualbox.org/virtualbox/LATEST.TXT`
wget http://download.virtualbox.org/virtualbox/$virtualbox_version/Oracle_VM_VirtualBox_Extension_Pack-$virtualbox_version.vbox-extpack
sudo VBoxManage extpack install Oracle_VM_VirtualBox_Extension_Pack-$virtualbox_version.vbox-extpack
@bmaupin
bmaupin / build-statifier.sh
Last active February 16, 2016 17:15
Build statifier
if [ ! -f /usr/bin/statifier ]; then
wget https://sourceforge.net/projects/statifier/files/latest/download?source=files -O statifier.tgz
tar -xvf statifier.tgz
cd statifier-*
make all
sudo make install
cd ..
rm -rf statifier*
else
echo "Statifier already installed"
@bmaupin
bmaupin / install-levelator.sh
Last active July 11, 2022 15:44
Install Levelator on Ubuntu 14.04
#!/bin/bash
levelator_version=Levelator-1.3.0-Python2.5
# Install dependencies
if ! dpkg -l python2.5 &> /dev/null; then
sudo apt-add-repository -y ppa:fkrull/deadsnakes
sudo apt-get update
sudo apt-get install -y python2.5
sudo apt-add-repository -ry ppa:fkrull/deadsnakes
@bmaupin
bmaupin / build-openssl.sh
Last active May 26, 2025 03:29
Build openssl (with SSLv2/3 support for security testing)
#!/bin/bash
# Cache sudo password
sudo -v
# Get latest OpenSSL 1.0.2 version from https://openssl.org/source/
# v1.1.0 seems to have removed SSLv2/3 support
openssl_version=1.0.2k
# Install build dependencies
# Get the latest version from here: http://support.amd.com/en-us/download/desktop?os=Ubuntu+x86+64
fglrx_version=15.302
sudo dpkg --add-architecture i386
sudo apt-get install lib32gcc1 libc6-i386
wget --referer=http://support.amd.com http://www2.ati.com/drivers/linux/fglrx_$fglrx_version-0ubuntu1_amd64_ub_14.01.deb
wget --referer=http://support.amd.com http://www2.ati.com/drivers/linux/fglrx-core_$fglrx_version-0ubuntu1_amd64_ub_14.01.deb
wget --referer=http://support.amd.com http://www2.ati.com/drivers/linux/fglrx-dev_$fglrx_version-0ubuntu1_amd64_ub_14.01.deb
wget --referer=http://support.amd.com http://www2.ati.com/drivers/linux/fglrx-amdcccle_$fglrx_version-0ubuntu1_amd64_ub_14.01.deb
sudo dpkg -i fglrx*.deb
sudo apt-get update