Skip to content

Instantly share code, notes, and snippets.

François M. francoism90

Block or report user

Report or block francoism90

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View qemu-gtk-test
qemu-system-x86_64 -display gtk \
-boot c \
-enable-kvm -machine q35,accel=kvm \
-object rng-random,id=rng0,filename=/dev/urandom \
-device virtio-rng-pci,rng=rng0 \
-cpu host \
-smp $(nproc) \
-m 4G \
-drive id=disk,file=/run/media/archie/Data/Images/droid,if=none,format=raw \
francoism90 / README.txt
Last active May 31, 2019
Reset MySQL 8.0 password (and use mysql_native_password)
View README.txt
# Adjust /etc/mysql/my.cnf when needed (see example)
# Create /tmp/mysql-init (see example) and make sure it can only be read by 'mysql'
# Stop MySQL service, e.g. 'mysqld'
# Use the correct (non-root) MySQL user to init mysqld, e.g. 'mysql'
shell> sudo systemctl stop mysqld
shell> sudo -u mysql mysqld --init-file=/tmp/mysql-init
# You should be able to login with your password set in /tmp/mysql-init.
francoism90 / power-on
Last active Jun 19, 2019
Prevents Thunderbolt/USB 3.1C suspend on my NUC
View power-on
# force Thunderbolt/USB 3.1C power
# doc:
echo 1 > /sys/bus/wmi/devices/86CCFD48-205E-4A77-9C48-2021CBEDE341/force_power; \
echo "on" > /sys/bus/wmi/devices/86CCFD48-205E-4A77-9C48-2021CBEDE341/power/control
francoism90 / 99-sysctl.conf
Created Mar 28, 2019
Linux performance tweaks (TCP/UDP, swap, VFS)
View 99-sysctl.conf
fs.file-max = 2097152
net.core.netdev_max_backlog = 250000
net.core.somaxconn = 1024
net.core.rmem_max = 67108864
francoism90 / chromium-flags.conf
Last active Jun 1, 2019
Chromium Linux flags to enable VA-API decoding, GPU-rending and hopefully some other useful stuff as well
View chromium-flags.conf
francoism90 / PKGBUILD
Created Feb 23, 2019
pkgdesc="Apparmor support for Firejail"
arch=('i686' 'x86_64')
francoism90 / gist:4e1e52b969747e86ab942a745a6724af
Last active Dec 14, 2018
Self-signed certificate (SAN) on Linux and accept this in Chrome/Chromium
View gist:4e1e52b969747e86ab942a745a6724af
$ openssl req -x509 -newkey rsa:4096 -sha256 -days 3650 -nodes -keyout server.key -out server.crt -subj '/CN=internal' -addext 'subjectAltName=DNS:internal,DNS:example.internal,DNS:project.internal,IP:'
$ certutil -d sql:$HOME/.pki/nssdb -A -t "TCu,Cu,Tuw" -n internal -i server.crt
francoism90 / 88XXau@.service
Created Nov 16, 2018
Set txpower and monitor mode
View 88XXau@.service
Description=Set 88XXau txpower and monitor-mode
After=systemd-udevd.service systemd-sysusers.service systemd-sysctl.service
ExecStart=sh -c 'iw %i set txpower fixed 3000'
francoism90 / init-start
Last active Feb 9, 2019
Change country to unlock channels, increase TX-power
View init-start
nvram set 0:maxp2ga0=114
nvram set 0:maxp2ga1=114
nvram set 0:maxp2ga2=114
nvram set 1:maxp2ga0=0x72
nvram set 1:maxp2ga1=0x72
nvram set 1:maxp2ga2=0x72
nvram set wl_txpower=500
nvram set wl0_txpower=500
nvram set wl1_txpower=500
View gist:8d5b35721a17a756f0ac777f395d3354
You can’t perform that action at this time.