Skip to content

Instantly share code, notes, and snippets.

@JeanRibes
JeanRibes / README.md
Last active April 15, 2024 10:22
gitmoji Bash/ZSH plugin

gitmoji chooser

This command will let you choose a "gitmoji" and pre-fill a git commit -m command for you, all without leaving the terminal

requirements

requires fzf to be installed and available in the $PATH

Bash

paste the contents of gitmoji.bash in ~/.bashrc``, or source` the file

@JeanRibes
JeanRibes / README.md
Last active July 14, 2023 14:36
kitty config

configuration Kitty

télécharger via l'installateur, puis aller dans le dossier principal

xdg-desktop-menu install --novendor share/applications/kitty.desktop
xdg-icon-resource install --novendor --size 256 --mode user share/icons/hicolor/256x256/apps/kitty.png

Ajouter le dossier kitty/bin au PATH (dans .profile)

0:0
1:1
2:2
3:3
4:-1
5:5
6:6
7:7
8:8
9:9
@JeanRibes
JeanRibes / README.md
Created December 28, 2021 23:02
convert HTML to Gemini markup through Firefox's Reading Mode
npm install @mozilla/readability jsdom
go install github.com/LukeEmmet/html2gmi@master
curl https://www.bortzmeyer.org/gemini.html | node main.js | html2gmi -l 1 > output.gmi
@JeanRibes
JeanRibes / logo.rs
Created November 10, 2021 23:54
compilateur LOGO en rust, sortie SVG dans le terminal
use std::ops::Add;
use std::borrow::Borrow;
use crate::Instruction::{Forward, Left, Right, Repeat};
use std::panic::panic_any;
use std::f64::consts::PI;
use std::fs::File;
use std::io::Write;
#[derive(Clone)]
enum Instruction {
@JeanRibes
JeanRibes / README.md
Created August 4, 2021 20:32
RGB mouse as a battery monitor

Install piper and psutil

@JeanRibes
JeanRibes / qgis_conway.py
Last active June 26, 2021 22:24
Conway's Game of Life as a QGIS layer
"""
Conway's Game of Life implemented in QGIS vectorlayer
How to use: run in terminal:
qgis --code qgis_conway.py
"""
from random import randint, choice, random
from threading import Lock
import qgis
@JeanRibes
JeanRibes / README.md
Last active May 6, 2021 22:25
websocket duplication

Utilisé pour partager un affichage GTK+ Broadway vers plusieurs personnes (par défaut un seul client)

broadwayd :0 & # lance le serveur Broadway, disponible à 127.0.0.1:8080

ensuite, se connecter sur http://ip-server:8082

On peut maintenant ouvrir des applications GTK dans Broadway

les clients doivent être connectés avant d'ouvir une appli, sinon ils ne la voient pas

@JeanRibes
JeanRibes / bridge.go
Created March 11, 2021 15:48
Minecraft Chat <-> ComputerCraft <-> Discord Bot <-> Discord
package main
import (
"bufio"
"fmt"
"github.com/bwmarrin/discordgo"
"golang.org/x/net/websocket"
"net/http"
"os"
"os/signal"
@JeanRibes
JeanRibes / bridge.lua
Created February 26, 2021 13:14
bridge opencomputers-discord
local internet = require("internet")
local term=require('term')
local thread = require("thread")
local sock = internet.socket("192.168.1.5", 25530)
function readMesages(sock)
while true do
rcv = sock:read()
if #rcv ~=0 then
print(rcv)