Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Bensuperpc bensuperpc

🏠
Working from home
View GitHub Profile
@bensuperpc
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
bensuperpc / readme.md
Last active Aug 21, 2021 — forked from jasonkarns/readme.md
Git send-email using Gmail
View readme.md
  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 Jul 26, 2021 — forked from dreikanter/encrypt_openssl.md
File encryption using OpenSSL
View encrypt_openssl.md

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 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
bensuperpc / git-updater.py
Created Jun 1, 2021
Update git repos and submodules
View git-updater.py
#
#
# 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 — forked from xerpi/make_3ds.sh
Linux 3DS scripts
View make_3ds.sh
#!/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 — forked from xerpi/.config
Buildroot .config Nintendo 3DS Linux
View .config
#
# 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
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>
#else
#include <sys/time.h>
@bensuperpc
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.