Skip to content

Instantly share code, notes, and snippets.

View Rydgel's full-sized avatar
😂
💯 🔥

Jérôme Mahuet Rydgel

😂
💯 🔥
View GitHub Profile
@Vendicated
Vendicated / index.js
Last active March 12, 2023 17:59
discord_arch_electron stream fix
const electron = require("electron");
const { join } = require("path");
class BrowserWindow extends electron.BrowserWindow {
constructor(options) {
if (options?.webPreferences?.preload && options.title) {
// Replace Discords preload script with our own
process.env.DISCORD_PRELOAD = options.webPreferences.preload;
options.webPreferences.preload = join(__dirname, "preload.js");
@RobFisher
RobFisher / framework_arch.markdown
Last active September 16, 2024 06:16
Install Arch on Framework laptop with BTRFS, encrypted swap and hibernate

See video: https://www.youtube.com/watch?v=BAQ78pBPjjc

Set up laptop

In BIOS, under security, set "Enforce secure boot" to "disabled".

Get install environment working

Keyboard layout for boot env:

localectl list-keymaps | grep uk

loadkeys uk

@eloylp
eloylp / Fedora35Hibernation.md
Last active November 5, 2024 16:49
Fedora 35 hibernation with swapfile, only for hibernation and resume

Fedora35 hibernation

This guide helps to configure the hibernation on a default Fedora35 (also worked fine in previous Fedora34) installation by using a swap file. The Fedora35 installation comes with btrfs as default filesystem. Also, it comes with a zram swap device:

$ swapon
NAME       TYPE      SIZE USED PRIO
/dev/zram0 partition   8G   0B  100
@Zenithar
Zenithar / Archlinux-EFI-LUKS2-LVM2-BTRFS-Systemd.md
Last active November 16, 2022 12:52
Tutorial d'installation Archlinux sur un SSD (NVMe) avec EFI / LUKS2 / LVM2 / BTRFS et systemd-boot comme chargeur de démarrage.

section: post date: "2020-04-12" title: "Archlinux sur un SSD avec EFI / LUKS2 / LVM2 / BTRFS" description: "Procédure d'installation d'Archlinux mise à jour et modernisée" slug: archlinux-efi-ssd-luks2-lvm2-btrfs tags:

  • linux
  • devops
  • luks2
@Vercidium
Vercidium / greedyvoxelmeshing
Last active November 16, 2024 20:00
Greedy Voxel Meshing ported to C#
// Code ported from https://0fps.net/2012/06/30/meshing-in-a-minecraft-game/
// Note this implementation does not support different block types or block normals
// The original author describes how to do this here: https://0fps.net/2012/07/07/meshing-minecraft-part-2/
const int CHUNK_SIZE = 32;
// These variables store the location of the chunk in the world, e.g. (0,0,0), (32,0,0), (64,0,0)
@brunogaspar
brunogaspar / macro.md
Last active September 15, 2024 18:42
Recursive Laravel Collection Macros

What?

If a nested array is passed into a Laravel Collection, by default these will be threaded as normal arrays.

However, that's not always the ideal case and it would be nice if we could have nested collections in a cleaner way.

This is where this macro comes in handy.

Setup

@OperationDarkside
OperationDarkside / reverse_audio.bat
Created August 9, 2017 22:29
Reverse the audio stream of a video using ffmpeg
ffmpeg -i video_with_rev_audio.mp4 -map 0 -c:v copy -af "areverse" reversed_audio.mp4
// routes.js
const routes = [
{
path: '/',
component: Home,
exact: true
},
{
path: '/gists',
component: Gists
@aaronlevin
aaronlevin / minimal-http.hs
Last active June 27, 2017 16:37
Minimal Haskell HTTP server written on top of warp via the Web Application Interface (no frameworks)
{-# LANGUAGE OverloadedStrings #-}
module Main where
import Network.Wai (pathInfo, Request, requestMethod, Response, responseLBS, ResponseReceived)
import Network.Wai.Handler.Warp (run)
import Network.HTTP.Types (status200, status401)
-- note: type Application = Request -> (Response -> IO ResponseReceived) -> IO ResponseReceived
application :: Request -> (Response -> IO ResponseReceived) -> IO ResponseReceived