Skip to content

Instantly share code, notes, and snippets.

View titanous's full-sized avatar

Jonathan Rudenberg titanous

View GitHub Profile
@donovanhide
donovanhide / Benchmark Results
Created December 15, 2012 17:21
First attempt at fast summing of a slice of uint8 using SSE assembly
go test sum -v -benchtime=0.1s
=== RUN TestSmallSumBytes
--- PASS: TestSmallSumBytes (0.00 seconds)
=== RUN TestSumBytes
--- PASS: TestSumBytes (2.52 seconds)
=== RUN TestBenchmark
--- PASS: TestBenchmark (10.96 seconds)
sum_test.go:75: Benchmark Results
Length: 0 Fast: 5.42 ns/op Slow: 4.93 ns/op Improvement -9.03%
Length: 1 Fast: 7.56 ns/op Slow: 5.26 ns/op Improvement -30.39%
@hrwgc
hrwgc / README.md
Last active September 4, 2023 11:15
VIIRS Nighttime Lights 2012 processing
@edef1c
edef1c / config-security
Last active September 27, 2024 11:02
Sane security defaults for SSH clients. Disables everything old and nasty.
# vim: ft=sshconfig
# Sane security defaults for SSH clients. Disables everything old and nasty.
# Unfortunately, SSH appears to provide no way to *exclude* old protocols,
# so we have a list of known-secure key exchange algorithms, symmetric ciphers,
# and message authentication codes.
# Config taken from [https://stribika.github.io/2015/01/04/secure-secure-shell.html]
Host *
KexAlgorithms [email protected],diffie-hellman-group-exchange-sha256
Ciphers [email protected],[email protected],[email protected],aes256-ctr,aes192-ctr,aes128-ctr

On Twitter the other day, I was lamenting the state of OCSP stapling support on Linux servers, and got asked by several people to write-up what I think the requirements are for OCSP stapling support.

  1. Support for keeping a long-lived (disk) cache of OCSP responses.

    This should be fairly simple. Any restarting of the service shouldn't blow away previous responses that were obtained. This doesn't need to be disk, just stable - and disk is an easy stable storage for most server

// +build windows
package screen
import (
"fmt"
"image"
"reflect"
"syscall"
"unsafe"
@braian87b
braian87b / dumb-ap-wired-link.sh
Last active May 4, 2025 20:09
How to setup a Dumb AP, Wired backbone for OpenWRT / LEDE
@Mic92
Mic92 / shell.nix
Created March 25, 2018 09:03 — forked from abbradar/shell.nix
Nix FHS env for OpenWrt
{ pkgs ? import <nixpkgs> {} }:
let
fixWrapper = pkgs.runCommand "fix-wrapper" {} ''
mkdir -p $out/bin
for i in ${pkgs.gcc.cc}/bin/*-gnu-gcc*; do
ln -s ${pkgs.gcc}/bin/gcc $out/bin/$(basename "$i")
done
for i in ${pkgs.gcc.cc}/bin/*-gnu-{g++,c++}*; do
ln -s ${pkgs.gcc}/bin/g++ $out/bin/$(basename "$i")
@Blizzke
Blizzke / flash.sh
Last active January 31, 2021 14:38
OctoPrint CLI flasher for Prusa MK2, MK3 and MMU2
#!/usr/bin/env bash
#
# This script was created to flash firmwares for the MK2, MK3 and the MMU2,
# all from the command line of your OctoPrint installation.
#
# The script assumes that you have avrdude and jq installed on your raspbian and that you
# have filled the API key below.
#
# Usage: flash.sh mk2|mk3|mmu2 firmware.hex