Skip to content

Instantly share code, notes, and snippets.

@AnnoyingTechnology
AnnoyingTechnology / securite_routiere.md
Created January 4, 2021 10:11
Introduction à la sécurité routière (orienté 2 roues)

Sécurité routière

Il y a deux dimensions à développer pour éviter l'accident.

  1. ne pas se mettre dans une situation dangereuse.
  2. utiliser ses compétences en pilotage pour se tirer d'une situation dangereuse.

L'humain est bien meilleur pour réfléchir à l'avance au calme, plutôt qu'à devoir gérer à la perfection une manoeuvre difficile dans le stress, la surprise et l'urgence.

C'est pourquoi il est préférable de ne pas avoir besoin du N°2.

@AnnoyingTechnology
AnnoyingTechnology / CanoniPF770.ppd
Created September 28, 2020 12:03
CanoniPF770.ppd (since Canon doesn't fucking provides it and it's hidden inside a pkg which is itself inside dmg. Or inside a .exe)... f* you canon.
*PPD-Adobe: "4.3"
*%Copyright CANON INC. 2019
*%PPD file for GARO's CUPS.
*FormatVersion: "4.3"
*FileVersion: "5.26"
*LanguageVersion: English
*LanguageEncoding: ISOLatin1
*PCFileName: "CNi770.ppd"
*Manufacturer: "CANON"
*Product: "(iPF770)"
@AnnoyingTechnology
AnnoyingTechnology / linux-tools.sh
Last active April 2, 2021 13:38
Linux server basic tools installation
apt install -y apt install rsync nload htop iotop lynx curl \ 
lm-sensors screen ncdu jq lbzip2 pigz unzip s-tui ethtool build-essential \ 
smartmontool hddtemp lmsensor
# for stretch
# python-pip
# pip install s-tui
@AnnoyingTechnology
AnnoyingTechnology / Apple's SuperDrive tweak for use with Linux.md
Last active March 6, 2024 22:53
Make Apple's USB SuperDrive work on Linux

I was ready to throw it away, I opened it up and didn't find anything wrong with it. After a quick Google Search, turns out Apple fucked up their users (again) and locked this drive to only one laptop : the MacBook Air.

Bellow is the tweak (found online) to make it usable on Linux

# Debian/linux only - Linux SCSI generic driver
sudo apt install sg3-utils -y
@AnnoyingTechnology
AnnoyingTechnology / Firefox-Lighttpd-TLS1.3.md
Created December 7, 2018 09:03
Secure Connection Failed with Firefox and Lighttpd SSL/TLS

So apparently, Firefox and lighttpd 1.4.45 (current version on Debian 9/stable) dont get along very well.

You will have connexion issue, and a message "Secure Connection Failed".

It would seem that Firefox and Lighttpd/Openssl are negociating a TLS 1.3 connexion (a new RFC), which fails to establish. A workaround/solution is to disable TLS 1.3 in lighttpd ssl.openssl.ssl-conf-cmd = ("Protocol" => "-ALL, TLSv1.2" but that option requires lighttpd 1.4.48.

You can get it and compile it from source (currently you get 1.4.53). Follow the guide https://redmine.lighttpd.net/projects/lighttpd/wiki/InstallFromSource It goes smoothly on debian.

@AnnoyingTechnology
AnnoyingTechnology / vboxwebsrv-keep-alive.md
Last active November 12, 2018 08:38
Keep VirtualBox's vboxwebsrv alive on systemd

As vboxwebsrv keeps dying, this is a quick and dirty fix.

/etc/systemd/system/vboxwebsrv.service

[Unit]
Description=vboxwebsrv

[Service]
ExecStart=/usr/bin/vboxwebsrv
@AnnoyingTechnology
AnnoyingTechnology / Multi-threaded-compression-unix.md
Last active December 12, 2019 07:51
Multi-threaded CLI cheatsheet for gzip, bz2, xz (lzma)

.gz (GNU zip)

Medium compression ratio, fast speed.

apt install pigz 
tar -I pigz -cvf archive.tar.gz folder-or-document
@AnnoyingTechnology
AnnoyingTechnology / gigabyte_Z370N-i7-8700K-golden-build.txt
Last active February 22, 2020 19:15
Hackintosh : Gigabyte Z370N + i7-8700K + SSD NVMe + SSD S-ATA
Golden build, i7-8700K iGPU HD630 and dedicated PCIe Wifi+BT.
I put together this build for a friend that has huge iTunes and iPhoto libraries and could not get a Mac with a large enough SSD (Only Mac"Pro" (lol) and iMac"pro" (lol) allow for larger than 1 or 2Tb SSD). Fusion drive was not good enough.
He's very happy with this built, using all of his Apple peripherals as usual (apple watch, ipad, iphone, keyboard, mouse...).
Plus, his computer is faster than a 3500€ iMac. (8e gen Intel core i7 vs 7 gen Inte core i7) + decent cooling solution. + he can add one more NVMe M.2 drive and three more SATA SSDs.
Components : Gigabyte Z370N rev 1.0, i7-8700K, Samsung 970 EVO 1Tb (PCIe), Samsung 860 EVO 2Tb (SATA), PCIe Wifi+BT (BCM946302CS)
0) Prepare the USB drive using the normal procedure
@AnnoyingTechnology
AnnoyingTechnology / highsierra_bootable.sh
Created August 29, 2018 14:48 — forked from agentsim/highsierra_bootable.sh
Create bootable ISO from HighSierra Installer
# Generate a BaseSystem.dmg with 10.13 Install Packages
hdiutil attach /Applications/Install\ macOS\ High\ Sierra.app/Contents/SharedSupport/InstallESD.dmg -noverify -mountpoint /Volumes/highsierra
hdiutil create -o /tmp/HighSierraBase.cdr -size 7316m -layout SPUD -fs HFS+J
hdiutil attach /tmp/HighSierraBase.cdr.dmg -noverify -mountpoint /Volumes/install_build
asr restore -source /Applications/Install\ macOS\ 10.13\ Beta.app/Contents/SharedSupport/BaseSystem.dmg -target /Volumes/install_build -noprompt -noverify -erase
cp -R /Volumes/highsierra/Packages /Volumes/OS\ X\ Base\ System/System/Installation
hdiutil detach /Volumes/OS\ X\ Base\ System/
hdiutil detach /Volumes/highsierra/
mv /tmp/HighSierraBase.cdr.dmg /tmp/BaseSystem.dmg
@AnnoyingTechnology
AnnoyingTechnology / lenovo_legion_y530_linux_compatibility_issues_fix.md
Last active April 19, 2024 00:15
Lenovo Legion Y530 Linux issues and solutions for wifi and touchpad mostly (Debian & Ubuntu)

Intel i7-8750H nVidia GTX 1050 Ti

Summary of my findings (Please comment if you can get further than me) :

edit: 06/2019 guys in the comments have found workarounds and new solutions !

Most importantly : Lenovo refuses to provide any kind of support for their product on Linux, even though the computer is sold without an OS

Ubuntu 18.04