Skip to content

Instantly share code, notes, and snippets.

View nyanloutre's full-sized avatar
🚅
Tchoo tchoo

Paul TREHIOU nyanloutre

🚅
Tchoo tchoo
  • Aperture Science
  • Strasbourg, France
View GitHub Profile
@jdinalt
jdinalt / sdl2-hapatic-retry.patch
Created September 5, 2019 18:58
SDL2 Patch to fix FFB on DiRT Rally 2.0 on Linux
diff -Naur SDL2-2.0.10/src/haptic/linux/SDL_syshaptic.c SDL2-2.0.10.patched/src/haptic/linux/SDL_syshaptic.c
--- SDL2-2.0.10/src/haptic/linux/SDL_syshaptic.c 2019-07-24 21:32:36.000000000 -0700
+++ SDL2-2.0.10.patched/src/haptic/linux/SDL_syshaptic.c 2019-09-04 10:52:36.784736281 -0700
@@ -974,6 +974,7 @@
SDL_HapticEffect * data)
{
struct ff_effect linux_effect;
+ int retry_count = 0;
/* Create the new effect */
@xsot
xsot / instructions.md
Last active March 3, 2024 13:42
sed maze solver

Usage

sed -E -f solver.sed input where input is a file containing the maze.

For best results, resize your terminal to match the height of the maze. To disable animations, delete the lines containing p.

Maze format

The solver assumes the following:

  • The maze only contains the characters # \nSE
  • Every line has the same number of characters
  • There is only one start (S) and end (E)
@CMCDragonkai
CMCDragonkai / nix_fetching_functions.md
Last active October 16, 2024 18:46
Nix Fetching Functions #nix

Found all these from nix-repl. Use builtins.fetchTarball for nixpkgs pinning!

builtins.fetchurl
builtins.fetchTarball
pkgs.fetchFromBitbucket
pkgs.fetchFromGitHub
pkgs.fetchFromGitLab
pkgs.fetchFromRepoOrCz
pkgs.fetchFromSavannah
@ageis
ageis / YubiKey-GPG-SSH-guide.md
Last active October 30, 2024 07:49
Technical guide for using YubiKey series 4 for GPG and SSH

YubiKey 4 series GPG and SSH setup guide

Written for fairly adept technical users, preferably of Debian GNU/Linux, not for absolute beginners.

You'll probably be working with a single smartcard, so you'll want only one primary key (1. Sign & Certify) and two associated subkeys (2. Encrypt, 3. Authenticate). I've published a Bash function which automates this slightly special key generation process.

@ageis
ageis / systemd_service_hardening.md
Last active November 15, 2024 09:28
Options for hardening systemd service units

security and hardening options for systemd service units

A common and reliable pattern in service unit files is thus:

NoNewPrivileges=yes
PrivateTmp=yes
PrivateDevices=yes
DevicePolicy=closed
ProtectSystem=strict
@samatjain
samatjain / Encrypted-Amazon-Cloud-Drive.md
Last active May 18, 2017 18:50
Setting up a encrypted drive on Amazon Cloud Drive w/ EncFS and acd_cli

Environment

export ACD_LOCAL=$HOME/.cache/Amazon-Cloud-Drive

# To use this file later
export ENCFS6_CONFIG=$ACD_LOCAL/encfs6.xml

Setup

mkdir -p \

@RLovelett
RLovelett / delete.sh
Created July 2, 2014 20:07
Delete ZFS snapshots from dataset one-liner
zfs list -r -H -t snapshot -o name stream/lxc/stash | xargs -n1 zfs destroy
@rxaviers
rxaviers / gist:7360908
Last active November 20, 2024 00:07
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue: