Skip to content

Instantly share code, notes, and snippets.

View francoism90's full-sized avatar
😸
Cuddling the cat

François M. francoism90

😸
Cuddling the cat
View GitHub Profile
@francoism90
francoism90 / qemu_win10x64.sh
Last active June 18, 2024 03:18
QEMU + Windows 10 x64 + KVM + IOMMU + AHCI + QXL & SPICE (as socket)
#!/bin/sh
qemu-system-x86_64 -enable-kvm -machine q35,accel=kvm \
-cpu host \
-m 4G \
-drive id=disk,file=/home/archie/Documents/Images/win10x64.img,if=none \
-drive file=/home/archie/Downloads/Win10_1709_English_x64.iso,index=3,media=cdrom \
-drive file=/home/archie/Downloads/drivers.iso,index=4,media=cdrom \
-device intel-iommu \
-device ich9-ahci,id=ahci \
-device ide-drive,drive=disk,bus=ahci.0 \
@francoism90
francoism90 / 98-smargo.rules
Created March 4, 2017 14:58
OSCam with DVB-ABI (Ziggo) and Smargo Smart Reader
SUBSYSTEM=="tty", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", GROUP="video", MODE="0660", SYMLINK+="smargo"
@francoism90
francoism90 / generator.php
Last active December 14, 2017 13:27
Laravel Seeder Generator KISS
<?php
/*
* Your settings here
*/
define('DB_DSN', 'mysql:host=localhost;dbname=mydb;charset=UTF8');
define('DB_USER', 'myuser');
define('DB_PASS', 'mypass');
define('DB_TABLE', 'mytable');
define('DB_OPTIONS', [
@francoism90
francoism90 / retrieve.py
Last active April 12, 2024 21:16
libtorrent - get seeds/peers + metadata without downloading (DHT/magnet)
#!/usr/bin/env python3
import libtorrent as lt
import time
import json
import os
def write_json(path, contents):
with open(path, 'w', encoding='utf-8') as f:
json.dump(contents, f, default=str, indent=4, sort_keys=True)
@francoism90
francoism90 / concat.sh
Last active July 9, 2018 16:31
Concat compatible video files using ffmpeg (in this case mp4)
#!/bin/sh
rm -rf .list.txt
for file in *; do
filename=$(basename -- "$file")
basename="${filename%.*}"
extension="${filename##*.}"
echo "file '$file'" >> .list.txt;
done
@francoism90
francoism90 / README.md
Last active December 6, 2024 08:16
Change country to unlock channels, increase TX-power. (Use at your own risk)

Disclaimer

Following instructions are provided without any warranty, and may even get you in trouble legally. The instructions are provided for testing, learning, preventing e-waste, and should be use with care. We (including contributers + commentators) are not responsible for any damage to your device(s) or any legal issues.

Getting Started

Instructions have been moved to https://github.com/francoism90/asus-router. :)

@francoism90
francoism90 / 88XXau@.service
Created November 16, 2018 18:09
Set txpower and monitor mode
[Unit]
Description=Set 88XXau txpower and monitor-mode
After=systemd-udevd.service systemd-sysusers.service systemd-sysctl.service
Before=network-pre.target multi-user.target shutdown.target
Conflicts=shutdown.target
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=sh -c 'iw %i set txpower fixed 3000'
@francoism90
francoism90 / 99-sysctl.conf
Created March 28, 2019 09:27
Linux performance tweaks (TCP/UDP, swap, VFS)
# https://docs.continuent.com/tungsten-clustering-5.0/performance-networking.html
# https://wiki.archlinux.org/index.php/Sysctl
# https://pubs.vmware.com/continuent/tungsten-replicator-3.0/performance-networking.html
# https://www.vultr.com/docs/how-to-setup-tcp-optimization-on-linux
# https://russ.garrett.co.uk/2009/01/01/linux-kernel-tuning/
fs.file-max = 2097152
net.core.netdev_max_backlog = 250000
net.core.somaxconn = 1024
net.core.rmem_max = 67108864
@francoism90
francoism90 / power-on
Last active January 6, 2023 19:55
Prevents Thunderbolt/USB 3.1C suspend on my NUC
#!/bin/sh
# force Thunderbolt/USB 3.1C power
# doc: https://www.kernel.org/doc/html/v5.1/admin-guide/thunderbolt.html
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
#!/bin/sh
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 \