Skip to content

Instantly share code, notes, and snippets.

@lukeplausin
lukeplausin / bash_aws_jq_cheatsheet.sh
Last active January 29, 2024 10:00
AWS, JQ and bash command cheat sheet. How to query, cut and munge things in JSON generally.
# Count total EBS based storage in AWS
aws ec2 describe-volumes | jq "[.Volumes[].Size] | add"
# Count total EBS storage with a tag filter
aws ec2 describe-volumes --filters "Name=tag:Name,Values=CloudEndure Volume qjenc" | jq "[.Volumes[].Size] | add"
# Describe instances concisely
aws ec2 describe-instances | jq '[.Reservations | .[] | .Instances | .[] | {InstanceId: .InstanceId, State: .State, SubnetId: .SubnetId, VpcId: .VpcId, Name: (.Tags[]|select(.Key=="Name")|.Value)}]'
# Wait until $instance_id is running and then immediately stop it again
aws ec2 wait instance-running --instance-id $instance_id && aws ec2 stop-instances --instance-id $instance_id
# Get 10th instance in the account
@r0l1
r0l1 / README.md
Created February 8, 2018 21:44 — forked from Luzifer/README.md
Running docker-compose as a systemd service

Running docker-compose as a systemd service

Files

File Purpose
/etc/compose/docker-compose.yml Compose file describing what to deploy
/etc/systemd/system/docker-compose.service Service unit to start and manage docker compose
/etc/systemd/system/docker-compose-reload.service Executing unit to trigger reload on docker-compose.service
/etc/systemd/system/docker-compose-reload.timer Timer unit to plan the reloads
version: '2.1'
services:
grafana:
container_name: grafana
image: proxx/grafana-armv7
user: "1000"
ports:
- 3000:3000
volumes:
- /opt/grafana:/etc/grafana:rw
@48klocs
48klocs / voltron.txt
Last active October 27, 2021 20:36
48klocs gigant0r #dimwishlists dump file
This file has been truncated, but you can view the full file.
// Mercules' Erentil FR4 breakdown
// https://www.reddit.com/r/DestinyTheGame/comments/cbxao7/massive_breakdown_of_erentil_fr4_including_stats/
// Erentil FR4
dimwishlist:item=3027844941&perks=194952923,3868766766,280464955,1600092898
dimwishlist:item=3027844941&perks=194952922,3868766766,280464955,1600092898
dimwishlist:item=3027844941&perks=194952923,2969185026,280464955,1600092898
dimwishlist:item=3027844941&perks=194952922,2969185026,280464955,1600092898
dimwishlist:item=3027844941&perks=194952923,3868766766,1645158859,1600092898
dimwishlist:item=3027844941&perks=194952922,3868766766,1645158859,1600092898
@andersevenrud
andersevenrud / alacritty-tmux-vim_truecolor.md
Last active April 28, 2024 12:48
True Color (24-bit) and italics with alacritty + tmux + vim (neovim)

True Color (24-bit) and italics with alacritty + tmux + vim (neovim)

This should make True Color (24-bit) and italics work in your tmux session and vim/neovim when using Alacritty (and should be compatible with any other terminal emulator, including Kitty).

Testing colors

Running this script should look the same in tmux as without.

curl -s https://gist.githubusercontent.com/lifepillar/09a44b8cf0f9397465614e622979107f/raw/24-bit-color.sh >24-bit-color.sh