I hereby claim:
- I am dougneal on github.
- I am dougneal (https://keybase.io/dougneal) on keybase.
- I have a public key ASCo4XpYOBxeHUlgvIeZuthmmV2l-74EYPqoeXTB6i3pswo
To claim this, I am signing this object:
| from pysolar.solar import get_azimuth, get_altitude | |
| import datetime | |
| import json | |
| import math | |
| from datetime import timedelta | |
| from zoneinfo import ZoneInfo | |
| LAT = 51.5649288 | |
| LON = 0.0172429 |
| Example input | |
| [ | |
| { | |
| "type": "pdq", | |
| "left": "12345....", | |
| "right": "67890...." | |
| }, | |
| { | |
| ... | |
| } |
| ### Temporary debugging config | |
| <system> | |
| log_level debug | |
| </system> | |
| <source> | |
| @type forward | |
| port 5160 | |
| bind 0.0.0.0 |
I hereby claim:
To claim this, I am signing this object:
Logit supports mutual auth in two ways:
This document covers the first example.
| #!/bin/bash | |
| set -eu | |
| arn="$1" | |
| session="$2" | |
| response="$(aws sts assume-role --role-arn "$arn" --role-session-name "$session")" | |
| AWS_ACCESS_KEY_ID="$(echo "$response" | jq -r '.Credentials.AccessKeyId')" | |
| AWS_SECRET_ACCESS_KEY="$(echo "$response" | jq -r '.Credentials.SecretAccessKey')" | |
| AWS_SESSION_TOKEN="$(echo "$response" | jq -r '.Credentials.SessionToken')" | |
| echo "export AWS_ACCESS_KEY_ID=\"${AWS_ACCESS_KEY_ID}\"" | |
| echo "export AWS_SECRET_ACCESS_KEY=\"${AWS_SECRET_ACCESS_KEY}\"" |
| URL="http://169.254.169.254/latest/meta-data/iam/security-credentials/$1" | |
| echo "export AWS_DEFAULT_REGION=\"eu-west-1\"" | |
| echo "export AWS_ACCESS_KEY_ID=\"$(curl $URL 2>/dev/null | jq -r '.AccessKeyId')\"" | |
| echo "export AWS_SECRET_ACCESS_KEY=\"$(curl $URL 2>/dev/null | jq -r '.SecretAccessKey')\"" | |
| echo "export AWS_SESSION_TOKEN=\"$(curl $URL 2>/dev/null | jq -r '.Token')\"" |
| #!/usr/bin/env ruby | |
| require 'socket' | |
| count=1 | |
| while true | |
| puts "Opening #{count}" | |
| s = TCPSocket.open('localhost', 35453) | |
| puts "Closing #{count}" |
| #!/bin/bash -e | |
| dd if="$0" bs=1 skip=90 | gunzip > "/tmp/_$$" | |
| exec /bin/bash "/tmp/_$$" $@ |
| package main | |
| import ( | |
| "bytes" | |
| "compress/gzip" | |
| "encoding/json" | |
| "io/ioutil" | |
| ) | |
| const ec2_userdata string = `#cloud-config |