Skip to content

Instantly share code, notes, and snippets.

View RodolpheGohard's full-sized avatar

Rodolphe RodolpheGohard

View GitHub Profile
"LD_* scout runtime" information:
{
"steam-runtime-system-info" : {
"version" : "0.20231107.1+srt1",
"path" : "/home/rodolphe/.local/share/Steam/ubuntu12_32/steam-runtime/amd64/usr/bin/steam-runtime-system-info"
},
"can-write-uinput" : true,
"steam-installation" : {
"path" : "/home/rodolphe/.local/share/Steam",
"data_path" : "/home/rodolphe/.local/share/Steam",
#!/bin/bash
# Removes old revisions of snaps
# CLOSE ALL SNAPS BEFORE RUNNING THIS
set -eu
LANG=C snap list --all | awk '/disabled/{print $1, $3}' |
while read snapname revision; do
snap remove "$snapname" --revision="$revision"
done
@RodolpheGohard
RodolpheGohard / clean.sh
Created October 6, 2023 07:37
Git cleaning
# see https://stackoverflow.com/questions/3184555/cleaning-up-old-remote-git-branches
git remote prune origin
git fetch --prune
@RodolpheGohard
RodolpheGohard / jstest.sh
Created May 19, 2023 11:24
Controllers on linux
# GUI to see controllers https://askubuntu.com/a/270111
# see also https://doc.ubuntu-fr.org/joystick
jstest-gui
@RodolpheGohard
RodolpheGohard / Gunter.pub
Last active January 13, 2023 12:05
my public keys
# Gunter
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCzgpbb/pc2xvbS0gzT+dQhww/mrr5Cjm56rAqF64LOliPUmNVVhOMTgyinYN3jcxTe7ckbA3SqQCgeAGaBd0lXL/AQkmmEzcTpTuVOhKm/sTjIty0GhFzRxOPN/MyoogB0YF6/Rq/pVtS3nGRFQSsDDkuwdHXACj4f3+NoSpH+WBwz8Nhi9/hSMxRypdf9gSurwNmy6wFhrlpPVB+JTYNtPzf0FW/2W0V+bKPVfUNN2Djtm6fdG+G81ZjeEmdWExaA0ycP426tYlhzLbio+R5BBqjnb4HitB5ZXlCCIwEutMVKJIK7DrYnNKtJeiurI4oZgQPi+ijVyFqsoLgK6HSoaKff2crLpch8t/p0IphqrRGbg8uzdsvzkY9mFYICtWfH+Q6wYHYoVghGnzzPYKCoBMsfMFah8tgGCVhsPykJNcJ3VJb2uUhPkTTSxZhtBJeELOPyE0foFuNnqeyAmkaKg87OmY/d/pIxyE58lbyoOQlObDe7FymyMrznyISVqK0= rodolphe@gunter
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIG6sWlso/+8htyeycc4iow9friyblZWtDZk6/gPWlIpq gohard.r@sfeir.com
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAII/UKHchpv+oSS9faE4BgIcp9Wy7PX8+QCVWbP97rqfF rg1693@gmail.com
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDDbpwscm+TDd9vJU+Cj6MA4LjkDYAl60lvGzFzHpu3Q9XeopsYCra0LdnqtFYg5haTI8Wh9N8BiWr8bjFcP6AQBhLKywj+P7hGGlgWMVKqMc4rPotPApNcvC2rhf+9mZTuhSOiBvFuM+Pk9e+UHEixU4NZ0g0oP8uhIWjcKbjXJq3BYND/TPDbLEWmiUnereCQrLIiNVm2HOkVCY4E
@RodolpheGohard
RodolpheGohard / Dockerfile
Created March 29, 2022 15:01
My dev in docker config
FROM node:14.17.3-slim
# Dependencies
RUN apt update && apt -y install curl less unzip git vim procps && apt clean
# Installing AWS client, https://docs.aws.amazon.com/cli/latest/userguide/install-cliv2-linux.html#cliv2-linux-install
RUN curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64-2.2.38.zip" -o "awscliv2.zip" && unzip awscliv2.zip && ./aws/install
# AWS config
COPY .aws /root/.aws
# Setting NPM prefix in a volume for persistence

Contributing guidelines

commits and commit message

Commit messages are for traceability. Any dev should understand the whys of a given implementation by looking at commits. This means:

  • Write useful commit messages
  • Avoid modyfing code when not directly needed

The general rule is: Use common sense, ask yourself what a dev, in 18 months, should read when he inspects a line you wrote because he needs to know why things are coded like this.

@RodolpheGohard
RodolpheGohard / pgpass_from_spring_properties.py
Created May 31, 2021 08:24
Extracts a .pgpass file from spring datasource in .properties
import sys
from configparser import ConfigParser
from urllib.parse import urlparse
CONFIG_PATH = sys.argv[1] if len(sys.argv)>1 else "application.properties"
with open(CONFIG_PATH, 'r') as f:
config_string = '[dummy]\n' + f.read()
config = ConfigParser()
@RodolpheGohard
RodolpheGohard / samba-ubuntu.md
Last active May 31, 2021 08:25
samba config on ubuntu
@RodolpheGohard
RodolpheGohard / optiperf.sh
Created November 4, 2020 14:13
sets the laptop up for audio production
cpupower frequency-set -g performance
echo 3072 > /sys/class/rtc/rtc0/max_user_freq
/sbin/sysctl -w vm.swappiness=10