Skip to content

Instantly share code, notes, and snippets.

View penso's full-sized avatar

Fabien Penso penso

View GitHub Profile
#!/usr/bin/env bash
# Abort sign off on any error
set -e
# Start the benchmark timer
SECONDS=0
# Repository introspection
OWNER=$(gh repo view --json owner --jq .owner.login)
@dhh
dhh / linux-setup.sh
Last active July 19, 2024 07:52
linux-setup.sh
# THIS LINUX SETUP SCRIPT HAS MORPHED INTO A WHOLE PROJECT: HTTPS://OMAKUB.ORG
# PLEASE CHECKOUT THAT PROJECT INSTEAD OF THIS OUTDATED SETUP SCRIPT.
#
#
# Libraries and infrastructure
sudo apt update -y
sudo apt install -y \
docker.io docker-buildx \
build-essential pkg-config autoconf bison rustc cargo clang \
@amiorin
amiorin / README.md
Last active July 18, 2024 10:31
How to configure Home Row Mods with KMonad on macOS

Intro

Karabiner and KMonad are great open source software. Don't forget to support the authors and contributors.

If you want to try home row mods on OSX, don't use Karabiner but KMonad. KMonad is harder at the beginning but then it is easier than Karabiner. Creating layers in KMonad is trivial and without drawbacks, while it is impossible in Karabiner without drawbacks.

You need to compile a PR of the project. Install https://github.com/pqrs-org/Karabiner-DriverKit-VirtualHIDDevice/releases/download/v2.1.0/Karabiner-DriverKit-VirtualHIDDevice-2.1.0.pkg

@X1ting
X1ting / telegram_check_auth.rb
Created February 26, 2023 23:49
Check telegram auth token
data = {
auth_date: DATE,
first_name: "NAME",
hash: "HASH",
id: ID,
last_name: "SURNAME",
photo_url: "PHOTO",
username: "USERNAME"
}
@MilesTEG1
MilesTEG1 / volume_sur_ssd_mvne_dans_NAS_Synology.md
Last active June 18, 2024 03:12
Utiliser un SSD MVNe dans un NAS Synology en tant que volume et pas en tant que cache

Utiliser un SSD MVNe dans un NAS Synology en tant que volume et pas en tant que cache

Objectif final :
Déplacer le dossier docker, et le paquet Docker sur le volume SSD NVMe pour gagner en fluidité. Voir §-III. à la fin de ce GIST.

Note :
Les commandes suivantes sont pour la plupart à lancer en root dans un terminal, pensez à faire un : sudo -i


@shqld
shqld / cargo_x86_64-unknown-linux-gnu-on-m1-mac.sh
Created March 15, 2022 14:19
cargo build for the target x86_64-unknown-linux-gnu on M1 Mac
# https://github.com/messense/homebrew-macos-cross-toolchains
brew tap messense/macos-cross-toolchains
brew install x86_64-unknown-linux-gnu
export CC_X86_64_UNKNOWN_LINUX_GNU=x86_64-unknown-linux-gnu-gcc
export CXX_X86_64_UNKNOWN_LINUX_GNU=x86_64-unknown-linux-gnu-g++
export AR_X86_64_UNKNOWN_LINUX_GNU=x86_64-unknown-linux-gnu-ar
export CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_LINKER=x86_64-unknown-linux-gnu-gcc
@fxn
fxn / 01 main.rs
Last active August 23, 2021 15:13
Mandelbrot set generator from "Programming Rust", with ports to Crystal and Ruby.
// Mandelbrot set generator from "Programming Rust", with I/O removed (the
// original code writes a PNG file).
use std::env;
use std::str::FromStr;
use num::Complex;
fn main() {
let args: Vec<String> = env::args().collect();
@dhh
dhh / Gemfile
Created June 24, 2020 22:23
HEY's Gemfile
ruby '2.7.1'
gem 'rails', github: 'rails/rails'
gem 'tzinfo-data', '>= 1.2016.7' # Don't rely on OSX/Linux timezone data
# Action Text
gem 'actiontext', github: 'basecamp/actiontext', ref: 'okra'
gem 'okra', github: 'basecamp/okra'
# Drivers
@chrisdiana
chrisdiana / mosh-macos.md
Last active June 12, 2024 05:39
Getting mosh server running on macOS Catalina

Running into this error message when trying to run a mosh server on macOS Catalina? The steps below should solve the problem which is most likely either a $PATH and/or firewall issues.

command not found: mosh-server
Connection to X.X.X.X closed.
/usr/local/bin/mosh: Did not find mosh server startup message. (Have you installed mosh on your server?)

1. Install Mosh