Skip to content

Instantly share code, notes, and snippets.

View bensuperpc's full-sized avatar
🕐
Working

Bensuperpc bensuperpc

🕐
Working
View GitHub Profile
@bensuperpc
bensuperpc / region-dpts-France.py
Created September 26, 2022 07:45 — forked from LouisBrunner/region-dpts-France.py
Liste des régions et départements français (dict. Python)
REGIONS = {
'Auvergne-Rhône-Alpes': ['01', '03', '07', '15', '26', '38', '42', '43', '63', '69', '73', '74'],
'Bourgogne-Franche-Comté': ['21', '25', '39', '58', '70', '71', '89', '90'],
'Bretagne': ['35', '22', '56', '29'],
'Centre-Val de Loire': ['18', '28', '36', '37', '41', '45'],
'Corse': ['2A', '2B'],
'Grand Est': ['08', '10', '51', '52', '54', '55', '57', '67', '68', '88'],
'Guadeloupe': ['971'],
'Guyane': ['973'],
'Hauts-de-France': ['02', '59', '60', '62', '80'],
@bensuperpc
bensuperpc / readme.md
Last active August 21, 2021 19:27 — forked from jasonkarns/readme.md
Git send-email using Gmail
  1. Configure git.
# ~/.config/git/config or ~/.gitconfig
[sendemail]
  confirm = auto
  smtpServer = smtp.gmail.com
  smtpServerPort = 587
  smtpEncryption = tls
  smtpUser = <gmail email address>
@bensuperpc
bensuperpc / encrypt_openssl.md
Created July 26, 2021 03:02 — forked from dreikanter/encrypt_openssl.md
File encryption using OpenSSL

Symmetic encryption

For symmetic encryption, you can use the following:

To encrypt:

openssl aes-256-cbc -salt -a -e -in plaintext.txt -out encrypted.txt

To decrypt:

@bensuperpc
bensuperpc / gcc-1.27.patch
Last active June 11, 2021 19:35 — forked from miyuki/gcc-1.27.patch
A patch required to build GCC 1.27 on a modern system
diff --git a/Makefile b/Makefile
index ee02e0f..25a4aa5 100644
--- a/Makefile
+++ b/Makefile
@@ -373,19 +373,19 @@ maketest:
stage1: force
-mkdir stage1
mv $(STAGESTUFF) $(STAGE_GCC) stage1
- -rm stage1/gnulib
+ -rm -f stage1/gnulib
@bensuperpc
bensuperpc / make_3ds.sh
Created May 16, 2021 19:00 — forked from xerpi/make_3ds.sh
Linux 3DS scripts
#!/bin/sh
TOOLCHAIN=/opt/armv6-eabihf--glibc--bleeding-edge-2020.02-2/bin/arm-buildroot-linux-gnueabihf-
cp arch/arm/configs/nintendo3ds_defconfig .config
make ARCH=arm CROSS_COMPILE=$TOOLCHAIN -j8
make ARCH=arm CROSS_COMPILE=$TOOLCHAIN nintendo3ds_ctr.dtb
echo "Output file: ./arch/arm/boot/zImage"
@bensuperpc
bensuperpc / .config
Created May 16, 2021 18:06 — forked from xerpi/.config
Buildroot .config Nintendo 3DS Linux
#
# Automatically generated file; DO NOT EDIT.
# Buildroot 2020.11-312-gfd5eeabac0 Configuration
#
BR2_HAVE_DOT_CONFIG=y
BR2_HOST_GCC_AT_LEAST_4_9=y
BR2_HOST_GCC_AT_LEAST_5=y
BR2_HOST_GCC_AT_LEAST_6=y
BR2_HOST_GCC_AT_LEAST_7=y
BR2_HOST_GCC_AT_LEAST_8=y
@bensuperpc
bensuperpc / benchmark-pc.c
Created October 20, 2020 18:08 — forked from Lewiscowles1986/benchmark-pc.c
Benchmarking PC
// Integer and float benchmark for Win32 and Win64
// Results are below main(), line 91
#include <stdlib.h>
#include <stdio.h>
#ifdef _WIN32
#include <sys/timeb.h>
#else
#include <sys/time.h>
@bensuperpc
bensuperpc / build_cross_gcc
Created July 16, 2020 07:28 — forked from preshing/build_cross_gcc
A shell script to download packages for, configure, build and install a GCC cross-compiler.
#! /bin/bash
set -e
trap 'previous_command=$this_command; this_command=$BASH_COMMAND' DEBUG
trap 'echo FAILED COMMAND: $previous_command' EXIT
#-------------------------------------------------------------------------------------------
# This script will download packages for, configure, build and install a GCC cross-compiler.
# Customize the variables (INSTALL_PATH, TARGET, etc.) to your liking before running.
# If you get an error and need to resume the script from some point in the middle,
# just delete/comment the preceding lines before running it again.