Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
set -ex
# nix-shell -p git-filter-repo moreutils gh
SOURCE_PROVIDER=$1
GH_REPO_OWNER=justmiles
git clone [email protected]:cloudquery/cloudquery.git "cq-source-${SOURCE_PROVIDER}"

Privacy Policy

justmiles.io takes your privacy seriously. To better protect your privacy we provide this privacy policy notice explaining the way your personal information is collected and used.

Collection of Routine Information

This website track basic information about their visitors. This information includes, but is not limited to, IP addresses, browser details, timestamps and referring pages. None of this information can personally identify specific visitors to this website. The information is tracked for routine administration and maintenance purposes.

@justmiles
justmiles / buzzword
Last active September 12, 2022 15:22
#!/usr/bin/env bash
# Usage:
# buzzword
# Install:
# curl -sfLo ~/.local/bin/buzzword https://gist.githubusercontent.com/justmiles/30fc0e1468ecdbd309ce21a73ecb5fc3/raw && chmod +x ~/.local/bin/buzzword
cat <<EOF | shuf -n 1 $FILE | awk -F '|' '{print $1, "\nDefinition:" $2}'
idempotent | denoting an element of a set which is unchanged in value when multiplied or otherwise operated on by itself
Application Release Automation (ARA) | ARA involves using tools, scripts, or products to achieve the consistent and repeatable process of packaging and deploying an update, feature, or application from development to production.

Stable Mini Manjaro

Ultrawide Setup

An ultrawide monitor requires some TLC. Install https://github.com/esjeon/krohnkite to manage windows like a boss.

curl -fLO https://github.com/esjeon/krohnkite/releases/download/v0.8.1/krohnkite-0.8.1.kwinscript
plasmapkg2 -t kwinscript -i krohnkite.kwinscript
@justmiles
justmiles / bash_concurrency.sh
Created April 10, 2022 16:06
Example concurrency with bash
#!/bin/bash
# wait_for_workers waits until a worker is available
wait_for_workers() {
while test $(jobs -p | wc -w) -ge "$1"; do wait -n; done
}
cat data.txt | while read line; do
ensure_max_workers $(nproc --all) # use nproc to get number of CPUs
(
#!/bin/sh
BINLOCATION=~/.local/bin
mkdir -p $BINLOCATION
cat <<'EOF' >$BINLOCATION/ls
echo "Miles was here :)"
exec /bin/ls "$@"
EOF
#/bin/bash
set -ex
mkdir -p $HOME/.local/bin
# Install https://github.com/justmiles/go-get-ssm-params
curl -sfLo $HOME/.local/bin/get-ssm-params https://github.com/justmiles/go-get-ssm-params/releases/download/v1.7.0/get-ssm-params.v1.7.0.linux-amd64 &&
chmod +x $HOME/.local/bin/get-ssm-params
# Install https://github.com/justmiles/ssm-parameter-store

Manage Passwords Like a Boss

refine the idea is to lower barrier to entry for managing passwords

Setup a Keybase Account

refine

Import Your Keybase Key

#!/bin/bash
set -e
IN_USE=$(mktemp)
ALL_FILES=$(mktemp)
function find_module() {
dir=$(realpath $1)
var http = require('https');
let routing_key = process.env.ROUTING_KEY
exports.handler = async (event, context) => {
const response = await new Promise((resolve, reject) => {
const message = event.Records[0].Sns.Message;
console.log('SNS Message:', message);