Skip to content

Instantly share code, notes, and snippets.

Working from home

Bensuperpc bensuperpc

Working from home
View GitHub Profile
bensuperpc / vector_bench_add
Last active Apr 15, 2022
google benchmark vector type
View vector_bench_add
#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 /
Last active Aug 21, 2021 — forked from jasonkarns/
Git send-email using Gmail
  1. Configure git.
# ~/.config/git/config or ~/.gitconfig
  confirm = auto
  smtpServer =
  smtpServerPort = 587
  smtpEncryption = tls
  smtpUser = <gmail email address>
bensuperpc /
Created Jul 26, 2021 — forked from dreikanter/
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 / gcc-1.27.patch
Last active Jun 11, 2021 — forked from miyuki/gcc-1.27.patch
A patch required to build GCC 1.27 on a modern system
View gcc-1.27.patch
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 /
Created Jun 1, 2021
Update git repos and submodules
# - for git clone and pull in local
# Created by Bensuperpc( 07 may 2019
# Updated by Bensuperpc( 01 June 2021
# Released into the Public domain with MIT licence
bensuperpc /
Created May 16, 2021 — forked from xerpi/
Linux 3DS scripts
cp arch/arm/configs/nintendo3ds_defconfig .config
make ARCH=arm CROSS_COMPILE=$TOOLCHAIN nintendo3ds_ctr.dtb
echo "Output file: ./arch/arm/boot/zImage"
bensuperpc / .config
Created May 16, 2021 — forked from xerpi/.config
Buildroot .config Nintendo 3DS Linux
View .config
# Automatically generated file; DO NOT EDIT.
# Buildroot 2020.11-312-gfd5eeabac0 Configuration
View benchmark-pc.c
// 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>
#include <sys/time.h>
bensuperpc / build_cross_gcc
Created Jul 16, 2020 — forked from preshing/build_cross_gcc
A shell script to download packages for, configure, build and install a GCC cross-compiler.
View build_cross_gcc
#! /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.