Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@frederikbosch
frederikbosch / Dockerfile
Created March 11, 2019 09:34
osslsigncode
FROM ubuntu:18.04
RUN apt-get update && apt-get install -y \
openssl libcurl4-openssl-dev libssl-dev libengine-pkcs11-openssl \
curl libcurl4 \
git automake libtool pkg-config wget \
libccid libpcsclite1 pcscd usbutils opensc
RUN git clone https://github.com/mtrojnar/osslsigncode
@Era-Dorta
Era-Dorta / create-efi-keys.sh
Last active April 16, 2024 08:10
Sign kernel modules on Ubuntu, useful for Nvidia drivers in UEFI system
# VERY IMPORTANT! After each kernel update or dkms rebuild the modules must be signed again with the script
# ~/.ssl/sign-all-modules.sh
# Place all files in ~/.ssl folder
mkdir ~/.ssl
cd ~/.ssl
# Generate custom keys with openssl
openssl req -new -x509 -newkey rsa:2048 -keyout MOK.priv -outform DER -out MOK.der -nodes -subj "/CN=Owner/"
@application2000
application2000 / how-to-install-latest-gcc-on-ubuntu-lts.txt
Last active February 21, 2024 03:02
How to install latest gcc on Ubuntu LTS (12.04, 14.04, 16.04)
These commands are based on a askubuntu answer http://askubuntu.com/a/581497
To install gcc-6 (gcc-6.1.1), I had to do more stuff as shown below.
USE THOSE COMMANDS AT YOUR OWN RISK. I SHALL NOT BE RESPONSIBLE FOR ANYTHING.
ABSOLUTELY NO WARRANTY.
If you are still reading let's carry on with the code.
sudo apt-get update && \
sudo apt-get install build-essential software-properties-common -y && \
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y && \
@Manouchehri
Manouchehri / windows10qemu.sh
Last active February 10, 2022 18:50
Running Windows 10 in a UEFI enabled QEMU environment with KVM.
# Installing
qemu-system-x86_64 -bios /usr/share/ovmf/ovmf_x64.bin -enable-kvm -cpu host -smp 4 -m 2048 -cdrom ~/Downloads/Win10_English_x64.iso -net nic,model=virtio -net user -drive file=~/vm/win10.hd.img.raw,format=raw,if=virtio -vga qxl -drive file=~/Downloads/virtio-win-0.1.105.iso,index=1,media=cdrom
# Running
qemu-system-x86_64 -bios /usr/share/ovmf/ovmf_x64.bin -enable-kvm -cpu host -smp 4 -m 4096 -net nic,model=virtio -net user -drive file=~/vm/win10.hd.img.raw,format=raw,if=virtio -vga qxl -usbdevice tablet -rtc base=utc
@Brainiarc7
Brainiarc7 / One line to rebuild all DKMS modules on Ubuntu
Last active September 20, 2023 10:09
One line to rebuild all DKMS modules on Ubuntu
Here goes.
ls /usr/src/linux-headers-* -d | sed -e 's/.*linux-headers-//' | \
sort -V | tac | sudo xargs -n1 /usr/lib/dkms/dkms_autoinstaller start
Run as root.
@shamil
shamil / mount_qcow2.md
Last active April 22, 2024 00:38
How to mount a qcow2 disk image

How to mount a qcow2 disk image

This is a quick guide to mounting a qcow2 disk images on your host server. This is useful to reset passwords, edit files, or recover something without the virtual machine running.

Step 1 - Enable NBD on the Host

modprobe nbd max_part=8