Skip to content

Instantly share code, notes, and snippets.

View fanfan54old's full-sized avatar
🙃

Fanfan54 fanfan54old

🙃
View GitHub Profile
javascript:v=["6Xdf_OaRNWs","QCGixQKvTpA","d3EiLxiGYgs","I4AE3BvIxMQ","5nsklx84-jE","SWnxzc-hOL8","rSmEPogTRI4","y4vHQJI9new","28l301P1Mt0","9ZXPk8nO_Io","BGjXQYhMrfU","KiREBlUVBqM","JMAWtZgReYg","6QwFKmSx7M4","xJOadVudax4","4gCGmqTT4pI","aBREyL_1gUk","C2n1l-6JrVw","3fS-wMld6h0","pDUaYOF7BgE","fjf4g0czaOk","Q89L0MHwfnI","V-XH3OPdz2Q","z-28471DtyY","BBYE9MI-xog","g9kAa1Wgckg","PNkwbdHhawY","bAbtUiiE1ng","5OlL6iTMiMU","Edn73InpbG8","FN9xbMxpzzM","y2NWhF5LALQ","MEkKhvyqiJc","6aLEOdvv610","RI5psJA97Y8","Umv8lFPDKKw","pKsdWOW-tAQ","WHEL_trlTvo","FKIo7DkFCBg","HPqwZM0KsaU","lQx-dvtw_lA","snPHqPEgLT0","ZFem8jb1lNk","KIUMikuxo5A","-EbWfbEPtWM","SCWyDK9zTs8","UyQiMpoSbD8","jtM6MDBuOgk","5wtSOKV2mtc","JJzTxXChvtM","lsEbffObxO0","TdEFXgAAzRk","KbvjtcEs-Hw","73FIVnwQN68","2K-YZE9CIbw","aT1N9qY1t0w","zGTlGpHRFDo","kFPBkmOOgbA","wLun7_QGenQ","iPD32RI7tFI","FjQ6nNExZeI","I28YAI-E44A","aSJAcZNtB6U","48xx9kU2CZs","NI_PsKNAN3w","rJnd-Cdwy_M","M6qUyeY4Ls8","qlVKQRwohjk","SGDw0glsTTM","-KZvK9Vpnzg","E7rg67waRE4","oKoYqLmP8Sk","W
let ytIDs = [
"6Xdf_OaRNWs",
"QCGixQKvTpA",
"d3EiLxiGYgs",
"I4AE3BvIxMQ",
"5nsklx84-jE",
"SWnxzc-hOL8",
"rSmEPogTRI4",
"y4vHQJI9new",
"28l301P1Mt0",
# Custom GRUB boot loader config for my PC, which will allow me to boot on my encrypted root partition
GRUB_DEFAULT=0
GRUB_TIMEOUT=3
GRUB_DISTRIBUTOR="Arch"
GRUB_CMDLINE_LINUX_DEFAULT="quiet"
GRUB_CMDLINE_LINUX="rd.luks.name=563cda29-70b8-427e-944c-431523e8c8e3=cryptlvm root=/dev/ARCHVG/ROOTLV nouveau.modeset=0 nomodeset acpi_rev_override=5"
# Preload both GPT and MBR modules so that they are not missed
GRUB_PRELOAD_MODULES="part_gpt part_msdos lvm"
#!/bin/bash
# Author: fanfan54 (https://gist.github.com/fanfan54/8fec2cd13bf7d992f7c064d5d0381ec5)
# Licensed under the GNU GPL v3.0 license
# Version 6 (first working version)
# TODO Add sources for all the commands
echo "[i] Starting the chroot script"
# vim:set ft=sh
# Custom mkinitcpio.conf for my configuration, which will allow me to boot on my encrypted root partition.
# I just added some hooks.
# Source : https://wiki.archlinux.org/index.php/Dm-crypt/System_configuration#mkinitcpio
# MODULES
# The following modules are loaded before any boot hooks are
# run. Advanced users may wish to specify all system modules
# in this array. For instance:
@fanfan54old
fanfan54old / arch_install_script_ap20xps.sh
Last active February 22, 2021 06:50
Custom, hard-coded installation script for Arch Linux with KDE on my DELL XPS 15 9560 (with the built-in Killer 1535 wifi card)
#!/bin/bash
# Author: fanfan54 (https://gist.github.com/fanfan54/b3430f29eef98c8b82b0de87d12d63bc)
# Licensed under the GNU GPL v3.0 license
# Version 6 (first working version)
# TODO Add sources for all the commands
echo "[i] Starting custom install script for Arch Linux with KDE on my DELL XPS 15 9560..."
echo "[i] THIS IS AN INTERACTIVE SCRIPT, IT IS NOT COMPLETELY AUTOMATED! Passwords will be prompted during setup!"
@fanfan54old
fanfan54old / get_movie_titles.py
Last active April 23, 2019 17:43
Get movie titles from a REST API (small practical exercise from a recruiter), using urllib3 and Python3
#!/usr/bin/env python3
import urllib3
import json
def read_page(title, page_nb):
http = urllib3.PoolManager()
r = http.request('GET', "https://jsonmock.hackerrank.com/api/movies/search/?Title=" + title + "&page=" + str(page_nb))
return (json.loads(r.data))
@fanfan54old
fanfan54old / arch_install_script_virtualbox_uefi.sh
Last active April 25, 2019 18:05
[EPITECH][B-SAD-200_my-web part 1] auto installer for Arch Linux in my-client (arch install script FOR VIRTUALBOX UEFI)
#!/bin/bash
echo "[B-SAD-200_my-web part 1] auto installer for Arch Linux in my-client"
echo "-----"
echo "/!\ IL FAUT AVOIR CRÉÉ UN DISQUE DUR DE 35 GO POUR POUVOIR INSTALLER LE DUAL BOOT! C'EST BON ?"
echo "L'installation commence dans 10 secondes..."
sleep 10
echo "> Loading french (AZERTY) keys..."
loadkeys fr-latin1
echo "> Enabling auto time update via NTP..."
@fanfan54old
fanfan54old / arch_install_script_libvirt_uefi.sh
Last active April 25, 2019 18:06
[EPITECH][B-SAD-200_my-web part 1] auto installer for Arch Linux in my-client (arch install script FOR LIBVIRT UEFI)
#!/bin/bash
echo "[B-SAD-200_my-web part 1] auto installer for Arch Linux in my-client"
echo "Authors: [email protected] [email protected]"
echo "-----"
echo "> Loading french (AZERTY) keys..."
loadkeys fr-latin1
echo "> Enabling auto time update via NTP..."
timedatectl set-ntp true
echo "> Setting timezone to Europe/Paris..."
@fanfan54old
fanfan54old / scriptkiddie-delete_discord_messages.js
Last active April 23, 2019 18:33
Delete every Discord private message sent to someone, in bulk (clicks on "Delete" automatically, 1 message per second)
var messages_div = document.getElementsByClassName("messages-3amgkR scroller")[0];
window.action_button_arr = [];
window.bdpm_i = 0;
window.bdpm_interval = 0;
window.scrollTopInterval = window.setInterval(function () {
if (messages_div.scrollTop == 0) {
clearInterval(window.scrollTopInterval);
window.action_button_arr = document.getElementsByClassName("button-3Jq0g9");
window.bdpmInterval = window.setInterval(function () {