Skip to content

Instantly share code, notes, and snippets.

View ReinForce-II's full-sized avatar

Reinforce-II ReinForce-II

View GitHub Profile
@ReinForce-II
ReinForce-II / build_cross_gcc
Created December 1, 2019 15:45 — 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.
@ReinForce-II
ReinForce-II / vscode.moe.settings.json
Created August 23, 2018 15:17
vscode.moe.settings.json
{
"background.customImages": [
"..."
],
"background.useDefault": false,
"background.style": {
"content": "''",
"pointer-events": "none",
"position": "fixed",
"top": 0,
module onebit_dac #(
parameter DATA_WIDTH = 32
)(
sys_clk,
i_val,
o_bit
);
input wire sys_clk;
input wire [DATA_WIDTH-1:0] i_val;
module axi_lite_bram #(
parameter ADDR_WIDTH = 32,
parameter DATA_WIDTH = 32,
parameter DEPTH = 16384
)(
clk,
rst,
araddr,
arready,
arvalid,
{
"stats": {},
"api": {
"services": [
"StatsService"
],
"tag": "api"
},
"policy": {
"levels": {
@ReinForce-II
ReinForce-II / nginx-ssl-qualys-100%-A+.vhost
Created March 2, 2018 07:31 — forked from r0mdau/nginx-ssl-qualys-100%-A+.vhost
Qualys SSL labs How To get A+ and 100% with Nginx
server {
listen 443 ssl deferred;
server_name example.com;
ssl_session_cache shared:SSL:10m;
ssl_session_timeout 24h;
ssl_buffer_size 4k;
ssl_session_tickets off;
ssl_protocols TLSv1.2;
#!/bin/sh
# cross & static compile shadowsocks-libev
PCRE_VER=8.40
PCRE_FILE="http://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-$PCRE_VER.tar.gz"
MBEDTLS_VER=2.6.0
MBEDTLS_FILE="https://tls.mbed.org/download/mbedtls-$MBEDTLS_VER-gpl.tgz"
16k-128.fio: read : io=784937MB, bw=1308.3MB/s, iops=83726 , runt=600004msec
16k-128.fio: write: io=87204MB, bw=148828KB/s, iops=9301 , runt=600004msec
16k-144.fio: read : io=791615MB, bw=1319.4MB/s, iops=84438 , runt=600004msec
16k-144.fio: write: io=87966MB, bw=150127KB/s, iops=9382 , runt=600004msec
16k-16.fio: read : io=415132MB, bw=708489KB/s, iops=44280 , runt=600002msec
16k-16.fio: write: io=46108MB, bw=78690KB/s, iops=4918 , runt=600002msec
16k-32.fio: read : io=576783MB, bw=984373KB/s, iops=61523 , runt=600002msec
16k-32.fio: write: io=64097MB, bw=109391KB/s, iops=6836 , runt=600002msec
16k-64.fio: read : io=714840MB, bw=1191.5MB/s, iops=76249 , runt=600002msec
16k-64.fio: write: io=79441MB, bw=135579KB/s, iops=8473 , runt=600002msec
@ReinForce-II
ReinForce-II / performance.txt
Created July 18, 2017 14:54 — forked from dstroot/performance.txt
Performance Tuning your TCP Stack
#!/bin/bash
echo "*****************************************"
echo " Based on information from Google"
echo " http://dev.chromium.org/spdy/spdy-best-practices"
echo "*****************************************"
sudo su
yum –y update
echo "*****************************************"
echo " Changing initcwnd and initrwnd"
echo " Step 1: check route settings."
@ReinForce-II
ReinForce-II / replace-debian-with-arch.txt
Created July 18, 2017 11:56 — forked from mbilker/replace-debian-with-arch.txt
Instructions to replace a live Debian installation with Arch
# Download latest archlinux bootstrap package, see https://www.archlinux.org/download/
wget http://ftp.nluug.nl/os/Linux/distr/archlinux/iso/2016.01.01/archlinux-bootstrap-2016.01.01-x86_64.tar.gz
# Make sure you'll have enough entropy for pacman-key later.
apt-get install haveged
# Install the arch bootstrap image in a tmpfs.
mount -t tmpfs none /mnt
cd /mnt
tar xvf ~/archlinux-bootstrap-2016.01.01-x86_64.tar.gz --strip-components=1