Skip to content

Instantly share code, notes, and snippets.

View linux-oneliners
sha256 of all running executables
for f in `ps -eo comm` ; do shasum5.28 -a 256 "$f" ; done
View encrypt string with openssl to send via email or chat
openssl genrsa -out key.pem
openssl rsa -in key.pem -pubout -out
Now you'll have pub + private keys
You can send the pub key to supplying user, who can then encrypt with it, and you can decrypt
To encrypt:
echo "xxxxxxxx" | openssl rsautl -encrypt -inkey ./ -pubin | base64
View aws-web-console-service-menu-customize.js
// ==UserScript==
// @name Whitelist AWS Console Service list
// @namespace
// @version 0.1
// @description Show only selected services in the AWS Web Console Services menu
// @author rdkls
// @match https://**
// @match https://**
// @grant none
// ==/UserScript==
#!/usr/bin/env python3
import argparse
import boto3
import botocore
import sys
import csv
from itertools import repeat as r
import concurrent.futures
# Compiles a Python package into a zip deployable on AWS Lambda
# - Builds Python dependencies into the package, using a Docker image to correctly build native extensions
# - Strip shared object files for smaller size ca. 20% reduction
# - Remove .py and use .pyc's = faster lambda and ca. 20% reduction
# - Remove tests, info (minor reduction, but why not)
# - Remove packages that will be available in AWS lambda env anyway (boto et al) ca. 50mb (uncompressed) reduction
# - Able to be used with the terraform-aws-lambda module
#!/usr/bin/env bash
# Description
# Bootstrap SSH Session to an SSM-managed instance
# by temporarily adding a public SSH key available on the local machine (ssh-agent or in ~/.ssh)
# Installation
# First run your eye over this script to check for malicious code
View gist:e071f8ff7810fb2be5a94ef33ba8a492
socat -v TCP4-LISTEN:443,reuseaddr,fork OPENSSL-CONNECT:,verify=0
#!/usr/bin/env python
# Generate config file for chrome extension "aws-extend-switch-roles"
import boto3
import argparse
import hashlib
from pprint import pprint
parser = argparse.ArgumentParser()
(cd ~/; git clone --recursive .vim; ln -sf $HOME/.vim/vimrc $HOME/.vimrc; cd $HOME/.vim; git submodule update --init)
You can’t perform that action at this time.