Skip to content

Instantly share code, notes, and snippets.

View rene-d's full-sized avatar
🤘
Let There Be Rock

rene-d rene-d

🤘
Let There Be Rock
  • Thales
  • France
View GitHub Profile
@rene-d
rene-d / bashdb.sh
Last active November 9, 2023 07:29
Little debugger for bash scripts
#!/bin/echo must be source:
# bash debugger
# Rene Devichi. https://unlicense.org
# Usage: `source bashdb.db` at the beginning of your script
# Inline version:
# curl -sL -o /tmp/bashdb.sh https://gist.github.com/rene-d/fd2d2c37dfc1371255818d73f7b5f1db/raw/bashdb.sh
# trap "rm -f /tmp/bashdb.sh" EXIT
# . /tmp/bashdb.sh
@citruz
citruz / QEMU_ON_M1.md
Last active May 4, 2024 07:50
Create Ubuntu and Windows VMs with QEMU on Apple Silicon

Running Linux and Windows on M1 with QEMU

30.11.2020: Updated with the new patchseries and instructions for Windows

02.12.2020: Added tweaks

08.12.2020: Updated with patchseries v4

31.01.2020: Updated with patchseries v6

@ArturKlauser
ArturKlauser / reregister-qemu-binfmt.sh
Last active March 16, 2024 08:05
Building Multi-Architecture Docker Images With Buildx
#!/bin/bash
# (c) 2020 Artur.Klauser@computer.org
# SPDX-License-Identifier: Apache-2.0 OR MIT
#
# This script tries to reregister QEMU's binfmt_misc handlers with the
# fix-binary (F) flag in order to be usable with 'docker buildx' to build
# multi-architecture images.
# For more information see:
# https://nexus.eddiesinentropy.net/2020/01/12/Building-Multi-architecture-Docker-Images-With-Buildx/
@rene-d
rene-d / fantoir.py
Last active April 15, 2021 13:30
Créer une base SQLite3 à partir du fichier FANTOIR de data.gouv.fr
#! /usr/bin/env python3
# rene-d 2018
# Unlicense: http://unlicense.org
"""
Fichier FANTOIR (Fichier ANnuaire TOpographique Initialisé Réduit)
https://www.data.gouv.fr/fr/datasets/fichier-fantoir-des-voies-et-lieux-dits/
crée une base SQLite3 à partir du fichier texte
#!/bin/bash
useage() {
printf "\n\e[1;4mAscii Escape Code Helper Utility\e[m\n\n"
printf " \e[1mUseage:\e[m colors.sh [-|-b|-f|-bq|-fq|-?|?] [start] [end] [step]\n\n"
printf "The values for the first parameter may be one of the following:\n\n"
printf " \e[1m-\e[m Will result in the default output.\n"
printf " \e[1m-b\e[m This will display the 8 color version of this chart.\n"
printf " \e[1m-f\e[m This will display the 256 color version of this chart using foreground colors.\n"
printf " \e[1m-q\e[m This will display the 256 color version of this chart without the extra text.\n"
@leoloobeek
leoloobeek / get_gists.py
Created April 26, 2017 21:34
Download all gists for a specific user
# first: mkdir user && cd user && cp /path/to/get_gists.py .
# python3 get_gists.py user
import requests
import sys
from subprocess import call
user = sys.argv[1]
r = requests.get('https://api.github.com/users/{0}/gists'.format(user))
@mjmckinnon
mjmckinnon / rsa_crt_recovery.py
Last active March 23, 2024 09:11
Recovery of a full RSA PrivateKey from only the CRT exponent1 (dP) and exponent2 (dQ)
#!/usr/bin/python
# Written by: Michael McKinnon @bigmac
# Get in contact with me if you found this useful
import os
import sys
import gmpy2
from Crypto.PublicKey import RSA
from Crypto.Cipher import PKCS1_v1_5
@lukas-h
lukas-h / license-badges.md
Last active May 1, 2024 10:20
Markdown License Badges for your Project

Markdown License badges

Collection of License badges for your Project's README file.
This list includes the most common open source and open data licenses.
Easily copy and paste the code under the badges into your Markdown files.

Notes

  • The badges do not fully replace the license informations for your projects, they are only emblems for the README, that the user can see the License at first glance.

Translations: (No guarantee that the translations are up-to-date)

@claymcleod
claymcleod / pycurses.py
Last active May 1, 2024 14:44
Python curses example
import sys,os
import curses
def draw_menu(stdscr):
k = 0
cursor_x = 0
cursor_y = 0
# Clear and refresh the screen for a blank canvas
stdscr.clear()
@JamesChevalier
JamesChevalier / mac_utf8_insanity.md
Last active May 2, 2024 23:38
Unicode on Mac is insane. Mac OS X uses NFD while everything else uses NFC. This fixes that.

convmv manpage

Install convmv if you don't have it

sudo apt-get install convmv

Convert all files in a directory from NFD to NFC:

convmv -r -f utf8 -t utf8 --nfc --notest .