Skip to content

Instantly share code, notes, and snippets.

@rmi1974
rmi1974 / how_to_control_virtualbox_from_the_command_line.md
Last active November 13, 2022 02:02
How to control VirtualBox from the command line #commandlinefu #virtualbox

How to control VirtualBox from the command line

Some of the command line examples for interacting with Windows VMs require credentials. The examples assume they are exported in the current shell environment for convience:

export VBOXUSER=vboxuser
export VBOXPASS=vboxuser
@Strykar
Strykar / upgrade_livepeer.sh
Last active October 16, 2023 11:13
Upgrade Livepeer Go binaries. Run as: $ upgrade_livepeer.sh 4efbda6d5e6586e7eb1e6ccbd526da65cdbe2e4e27a01cb76b1f2893fe790fdb
#!/bin/bash
# Download, extract and update Livepeer binary from Github to a pre-existing directory you set below
# It assumes you have extracted the previous livpeer tar.gz in it and run livepeer from the same directory
# Not intended to be run as root
#
# Expects bash, jq, curl, grep, sed, sha256sum and tar to be installed, usually available even on embedded systems
# Windows Subsystem for Linux (WSL) or Cygwin should provide every utility on Windows
# shellcheck disable=SC2015
set -euf -o pipefail
@oleksis
oleksis / Compile Mainline Kernel (5.15.0) from WSL2.md
Last active February 21, 2024 19:48
Steps for compile Mainline Kernel Linux using WSL2

Compile Mainline Kernel for WSL2

Steps for compile Kernel Linux 5.15.0

Actual Kernel

$ uname -a
Linux DESKTOP-ID 4.19.128-microsoft-standard #1 SMP Tue Jun 23 12:58:10 UTC 2020 x86_64 GNU/Linux

Work Dir linux

@promovicz
promovicz / README.txt
Last active November 16, 2021 03:07
Enhanced dmenu for use with qubes and i3
Example use:
# qubes control
bindsym $mod+u exec --no-startup-id "qubes-i3-dmenu-shell --start"
bindsym $mod+Shift+u exec --no-startup-id "qubes-i3-dmenu-shell --pause"
bindsym $mod+i exec --no-startup-id "qubes-i3-dmenu-shell --shutdown"
bindsym $mod+Shift+i exec --no-startup-id "qubes-i3-dmenu-shell --unpause"
# qubes launching
bindsym $mod+o exec --no-startup-id "qubes-i3-dmenu-shell --global"
@Firsh
Firsh / install-vivaldi-custom-css.bat
Last active March 3, 2023 21:22
Install Vivaldi Custom CSS
@set installhooks_args=%*& set installhooks_self=%~f0& powershell -c "(gc \"%~f0\") -replace '@set installhooks_args.*','#' | Write-Host" | powershell -c -& goto :eof
$srcdir = split-path $env:installhooks_self
$vivpath = "c:\Program Files\Vivaldi\Application\"
Try {
$dstdir = split-path ((Get-ChildItem -path $vivpath -recurse browser.html | Sort-Object -property CreationTime -descending | Select-Object -first 1).FullName)
write-host "Destination directory: $dstdir"
$encoding = (New-Object System.Text.UTF8Encoding($False))
@arvati
arvati / Alpine chroot btfrs grub2 install.md
Last active October 22, 2023 11:53
Install Alpine linux using chroot method and btrfs rootfs using grub2 for booting

Alpine chroot btfrs grub2 install

Mount root subvolume

mount -t btrfs -o subvolid=5,noatime,nodiratime,noacl,nossd 'UUID=68706ead-a626-4209-b3d0-1187b835f803' /mnt/btrfs
mount -o remount,exec /mnt/btrfs

List BTRFS subvolumes

btrfs subvolume list -t --sort=path /mnt/btrfs
/*!
* VERSION: 0.9.1
* DATE: 2019-02-21
* UPDATES AND DOCS AT: http://greensock.com
*
* @license Copyright (c) 2008-2019, GreenSock. All rights reserved.
* MorphSVGPlugin is a Club GreenSock membership benefit; You must have a valid membership to use
* this code without violating the terms of use. Visit http://greensock.com/club/ to sign up or get more details.
* This work is subject to the software agreement that was issued with your membership.
*
@jjvillavicencio
jjvillavicencio / setup.sh
Last active May 5, 2024 12:53
Install Android SDK on Windows Bash (WSL)
cd /home/<user>/
sudo apt-get install unzip
wget https://dl.google.com/android/repository/sdk-tools-linux-4333796.zip
unzip sdk-tools-linux-4333796.zip -d Android
rm sdk-tools-linux-4333796.zip
sudo apt-get install -y lib32z1 openjdk-8-jdk
export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
export PATH=$PATH:$JAVA_HOME/bin
printf "\n\nexport JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64\nexport PATH=\$PATH:\$JAVA_HOME/bin" >> ~/.bashrc
cd Android/tools/bin
@fedme
fedme / Ionic Android Development on WSL.md
Last active May 7, 2023 16:21
Ionic Android Development on WSL (Windows Subsystem for Linux)

Ionic Android Development on WSL

Installing the required software

Execute the following commands to install Node, npm, git, Java, Ionic, Cordova and Angular CLI:

cd ~
sudo apt update
sudo apt upgrade
@ruario
ruario / check-user-namespace.sh
Last active May 20, 2022 17:21
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
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"