Skip to content

Instantly share code, notes, and snippets.

View penso's full-sized avatar

Fabien Penso penso

View GitHub Profile
@OXY2DEV
OXY2DEV / CMD.md
Last active February 5, 2025 12:29

🔰 A beginners guide to create custom cmdline

showcase

Ever wanted to know how noice creates the cmdline or wanted your own one?

No one? Guess it's just me 🥲.

Anyway, this post is a simple tutorial for creating a basic cmdline in neovim.

#!/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)
@larry0x
larry0x / how-to-spin-up-local-devnet.md
Last active January 31, 2025 15:26
How to spin up a local Grug devnet

How to spin up a local devnet

  1. Compile CometBFT, i.e. the sequencing layer:
git clone https://github.com/cometbft/cometbft
cd cometbft
git checkout v0.38.10
make install
@dhh
dhh / linux-setup.sh
Last active April 28, 2025 16:30
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 April 12, 2025 21:19
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

How to test websocket in rust Actix framework

It is taking a lot of time to research how to properly test websocket in Actix framework, because their docs, googling and ChatGPT didnt give me answers that works for me. I am not sure is it my googling skill problem or not many people are not asking the same problem as what i did, anyway i found the solution inside actix's source code. I didnt find that in actix's documentation page so i think i better write my findings down and hopefully this can help others who are facing the same problem. First let me share what I have found and what are their problem. Please correct me if my findings are not accurate as I am just a beginner to Rust and Actix.

  1. Some are like spinning up a separate server and separete process to test against the server, this will work but not as clean, breakpointing at the server doesnt imply breakpointing in the testing process, there might be side effect for example timeout logic in test etc. And need spin up the server before running
@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 November 21, 2024 19:05
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