Skip to content

Instantly share code, notes, and snippets.

View bensuperpc's full-sized avatar
🕐
Working

Bensuperpc bensuperpc

🕐
Working
View GitHub Profile
@bensuperpc
bensuperpc / raylib_cube.c
Last active January 8, 2023 10:15
Raylib cube
/*******************************************************************************************
*
* raylib example - procedural mesh generation
*
* Example originally created with raylib 1.8, last time updated with raylib 4.0
*
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
* BSD-like license that allows static linking with closed source software
*
* Copyright (c) 2017-2023 Ramon Santamaria (@raysan5)
@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 / vector_bench_add
Last active April 15, 2022 09:20
google benchmark vector type
#include <algorithm>
#include <vector>
#include <benchmark/benchmark.h>
template<class T>
static void vector_add(benchmark::State& state)
{
size_t size = state.range(0);
@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 / git-updater.py
Created June 1, 2021 15:58
Update git repos and submodules
#
#
# git-updater.py - for git clone and pull in local
#
# Created by Bensuperpc(Bensuperpc@gmail.com) 07 may 2019
# Updated by Bensuperpc(Bensuperpc@gmail.com) 01 June 2021
#
#
# Released into the Public domain with MIT licence
# https://opensource.org/licenses/MIT
@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>