Skip to content

Instantly share code, notes, and snippets.

View titanous's full-sized avatar

Jonathan Rudenberg titanous

View GitHub Profile
@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
@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")
@braian87b
braian87b / dumb-ap-wired-link.sh
Last active May 9, 2024 10:28
How to setup a Dumb AP, Wired backbone for OpenWRT / LEDE
// +build windows
package screen
import (
"fmt"
"image"
"reflect"
"syscall"
"unsafe"

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

@edef1c
edef1c / config-security
Last active August 29, 2015 14:12
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 curve25519-sha256@libssh.org,diffie-hellman-group-exchange-sha256
Ciphers chacha20-poly1305@openssh.com,aes256-gcm@openssh.com,aes128-gcm@openssh.com,aes256-ctr,aes192-ctr,aes128-ctr
@hrwgc
hrwgc / README.md
Last active September 4, 2023 11:15
VIIRS Nighttime Lights 2012 processing
@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%
@gavinandresen
gavinandresen / btcpayments.rst
Last active March 28, 2021 06:40
Bitcoin Payment Messages

SEE BIP 70

See https://en.bitcoin.it/wiki/BIP_0070 for the latest version of this document; I'll keep this document so the process of discussion/revision isn't lost.

Bitcoin Payment Messages

This document proposes protocol buffer-based formats for a simple payment protocol between a customer's bitcoin client software and a merchant.

@wofeiwo
wofeiwo / fcgiclient.go
Created September 15, 2012 09:08
Golang FastCGI Client
// Copyright 2012 Junqing Tan <ivan@mysqlab.net> and The Go Authors
// Use of this source code is governed by a BSD-style
// Part of source code is from Go fcgi package
// Fix bug: Can't recive more than 1 record untill FCGI_END_REQUEST 2012-09-15
// By: wofeiwo
package fcgiclient
import (