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
@francoism90
francoism90 / 99-sysctl.conf
Created Mar 28, 2019
Linux performance tweaks (TCP/UDP, swap, VFS)
View 99-sysctl.conf
# 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 / chromium-flags.conf
Last active Mar 17, 2019
Chromium Linux flags to enable VA-API decoding, GPU-rending and hopefully some other useful stuff as well
View chromium-flags.conf
--allow-insecure-localhost
--autoplay-policy=document-user-activation-required
--disable-gpu-driver-bug-workarounds
--enable-accelerated-2d-canvas
--enable-accelerated-mjpeg-decode
--enable-accelerated-video
--enable-features=AutomaticPasswordGeneration,NativeNotifications,ParallelDownloading,PictureInPicture,SoundContentSetting,UseSurfaceLayerForVideo,WebRtcHideLocalIpsWithMdns,google-password-manager,ScrollAnchorSerialization,SingleClickAutofill
--enable-gpu-async-worker-context
--enable-hardware-overlays
--enable-native-gpu-memory-buffers
@francoism90
francoism90 / PKGBUILD
Created Feb 23, 2019
firejail-apparmor
View PKGBUILD
pkgname=firejail-apparmor
pkgver=0.9.58.2
pkgrel=1
pkgdesc="Apparmor support for Firejail"
arch=('i686' 'x86_64')
url="https://firejail.wordpress.com/"
license=('GPL2')
depends=('apparmor')
provides=('firejail')
conflicts=('firejail')
@francoism90
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:192.168.1.100'
$ certutil -d sql:$HOME/.pki/nssdb -A -t "TCu,Cu,Tuw" -n internal -i server.crt
@francoism90
francoism90 / 88XXau@.service
Created Nov 16, 2018
Set txpower and monitor mode
View 88XXau@.service
[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 / init-start
Last active Feb 9, 2019
Change country to unlock channels, increase TX-power
View init-start
#!/bin/sh
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
https://color.firefox.com/?theme=XQAAAAIUAQAAAAAAAABBqYhm849SCia2CaaEGccwS-xNKliFu97x_iFQjmbD_6TqqbqcXJHtbn8GxEVqbIM4AEampNJCrE4OuHENWFnRfkKle_bR7WuNhPRzUll4VOPFkPYDe3hHEKTL__Ym-RTF9CErTXygBg6AqkTVajlBTawxcxm-WPLQZJ3Y1mCLtXNCHxGpRdL46OhzxGGcEmZwNAz96KxHIFCmUU2M6gkX8p1WSawFhFsqGGtOnAwP_96YYAA
@francoism90
francoism90 / concat.sh
Last active Jul 9, 2018
Concat compatible video files using ffmpeg (in this case mp4)
View concat.sh
#!/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 / backup.sh
Last active Jun 16, 2018
Backup borg script using pull with sshfs
View backup.sh
#!/bin/sh
# Remote Settings
export SSH_HOST='root@domain.tld'
export SSH_REMOTE_PATH='/'
export SSH_LOCAL_PATH='/home/user/Backups/tmp/vps1/source'
export SSH_ARGS='-C -o ro -o IdentityFile=/home/user/.ssh/id_rsa'
# Destination Settings
export DEST_PATH='/home/user/Backups/vps1'
@francoism90
francoism90 / certbot.sh
Last active May 23, 2018
Activate wildcard Certbot/Let's Encrypt
View certbot.sh
# certbot certonly --manual -d domain.tld -d *.domain.tld -d domain2.tld -d *.domain2.tld --agree-tos --manual-public-ip-logging-ok --preferred-challenges dns-01 --server https://acme-v02.api.letsencrypt.org/directory
You can’t perform that action at this time.