Skip to content

Instantly share code, notes, and snippets.

@leonklingele
leonklingele / gist:a221d95d759310a744eec37fc95c4729
Created Feb 17, 2021
0001-Revert-runtime-use-clock_gettime-instead-of-gettimeo.patch
View gist:a221d95d759310a744eec37fc95c4729
From b27c969f972ae942dba6be33b21f0110adcf7f5f Mon Sep 17 00:00:00 2001
From: Leon Klingele <git@leonklingele.de>
Date: Wed, 17 Feb 2021 09:55:58 +0100
Subject: [PATCH] Revert "runtime: use clock_gettime instead of gettimeofday on
darwin"
This reverts commit ae76f6e96216f352cc5021a4c8a7d879c4cb6873.
---
src/runtime/sys_darwin.go | 6 +++---
src/runtime/sys_darwin_amd64.s | 8 +++-----
@leonklingele
leonklingele / client.sh
Last active Mar 29, 2021
netcat – encrypt transfer with openssl
View client.sh
IP="127.0.0.1"
PORT="8877"
SHARED_SECRET="shared secret"
OPENSSL="/usr/local/opt/libressl/bin/openssl"
OPENSSL_CMD="$OPENSSL enc -a -A -aes-256-gcm"
while IFS= read -r MSG; do
echo "$MSG" | $OPENSSL_CMD -e -k "$SHARED_SECRET"
echo
@leonklingele
leonklingele / 0001-apple-keychain-integration-other-changes.patch
Last active Apr 19, 2021
openssh-{7.7,7.8,7.9,8.0,8.1,8.2,8.3,8.4,8.5,8.6}p1 patches for storing SSH passphrases in the OS X keychain. https://github.com/leonklingele/homebrew-dupes
View 0001-apple-keychain-integration-other-changes.patch
From a06928934c9a27eee8ea050ead392afc5c21cd22 Mon Sep 17 00:00:00 2001
From: Leon Klingele <git@leonklingele.de>
Date: Wed, 3 Mar 2021 09:48:28 +0100
Subject: [PATCH 1/2] apple-keychain-integration-other-changes
---
Makefile.in | 16 +-
audit-bsm.c | 7 +-
auth.c | 2 +-
authfd.c | 25 ++
View build_nginx.sh
#!/usr/bin/env bash
set -eufo pipefail
SUDO=""
if [ "$EUID" -ne 0 ]; then
SUDO="sudo"
if ! [ -x "$(command -v $SUDO)" ]; then
echo "Error: Running script as non-root and $SUDO is not installed. Exiting." >&2
exit 1