Skip to content

Instantly share code, notes, and snippets.

@jesselang
jesselang / export-0.8.18.html
Created March 8, 2023 22:17
Logseq HTML export issue
<ul><placeholder /><li>Header</li><li>Basic <a>[[double square bracket]]</a> link</li><li>Basic <a>[external](https://google.com)</a> link with a <a>#tag</a></li><li>Here's some <i>emphasis</i> and <i>emphasis</i> and <b>bold <i>emphasis</i></b></li></ul>
@jesselang
jesselang / inject-sts-session.sh
Last active February 9, 2022 17:37
Inject STS session credentials
# Explicit export
eval $(
aws sts assume-role --role-arn ... --role-session-name ... \
| jq --raw-output '"AWS_ACCESS_KEY_ID=\(.Credentials.AccessKeyId) AWS_SECRET_ACCESS_KEY=\(.Credentials.SecretAccessKey) AWS_SESSION_TOKEN=\(.Credentials.SessionToken)"'
)
export AWS_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY AWS_SESSION_TOKEN
# Implicit export
eval export $(
aws sts assume-role --role-arn ... --role-session-name ... \
package main
import (
"machine"
"time"
)
const pattern = "... ––– ..."
const interval = time.Second / 3
ldap_search() {
local command=(
ldapsearch -b "${LDAP_BASE_SEARCH}"
-H "${LDAP_SERVER_URI}"
-D "${LDAP_DOMAIN}\\${LDAP_USER:-$USER}"
${LDAP_PASSWORD+"-w"}
"${LDAP_PASSWORD:-"-W"}"
"$@"
)

Keybase proof

I hereby claim:

  • I am jesselang on github.
  • I am jesselang (https://keybase.io/jesselang) on keybase.
  • I have a public key ASCXafSYUUuqog_KjVKt0_Oqv9DQluqsfuLKwT6nV171zQo

To claim this, I am signing this object:

@jesselang
jesselang / devops.md
Created September 19, 2018 18:49
Notes from B-Sides MSP 2016 (I think)

DevOps - Fast, Furious, Secure

We don't make the money, we save the money for the company.

Traditional approach to security like the TSA, Gate-based waterfall methodology

Embedding security earlier - "move it to the left" Doesn't work with iterative process.

@jesselang
jesselang / giphy.txt
Created September 19, 2018 18:39
giphy URLs I'm in frequent need of
IT Crowd - Hello IT Have you tried turning it off and on again.
https://i.giphy.com/F7yLXA5fJ5sLC.gif
Sandlot - You're killing me Smalls
http://i.giphy.com/PtQrzJUJ7Q9d6.gif
Hurcules - Disappointed!
http://i.giphy.com/L02M3FJhkF19S.gif
@jesselang
jesselang / asciiart.txt
Created September 19, 2018 18:37
Asciiart I'm in frequent need of
¯\_(ツ)_/¯
(╯°□°)╯︵ ┻━┻
(╯︵╰,)
#!/bin/bash
if [ $# -ne 1 ]
then
echo "Performs a number of encodings on the first argument string"
echo "Usage: `basename $0` {string}"
exit 1
fi
printf "n# String Scrambles:n"
@jesselang
jesselang / verify_utf.adb
Created January 24, 2016 18:06
I wrote this in May of 2010, and don't remember what it does, but better it being forgotten here than on a hard drive.
with Ada.Text_IO;
with Ada.Command_Line;
with Ada.Streams.Stream_IO;
use Ada.Streams;
procedure Verify_UTF is
First_Word : constant Stream_Element_Array (1 .. 2) := (16#fe#, 16#ff#); -- http://en.wikipedia.org/wiki/Byte_order_mark
Second_Word : constant Stream_Element_Array (1 .. 2) := (16#00#, 16#22#);