Skip to content

Instantly share code, notes, and snippets.

View jesperalmstrom's full-sized avatar
⛷️
more snow

Jesper Almstrom jesperalmstrom

⛷️
more snow
View GitHub Profile
@jesperalmstrom
jesperalmstrom / generate_aws_sso_config.py
Last active July 31, 2025 14:06
Generate AWS sso config file with profiles for all accounts in organization
import boto3
import argparse
import os
import sys
import configparser
import logging
import shutil # newly added import
from datetime import datetime
# Constants
@AppleBoiy
AppleBoiy / alias_eza.md
Last active July 30, 2025 22:44
eza-ls

Alias eza for ls command

Put to shell configure file

first install eza by homebrew

brew install eza

Basic setup

@sts10
sts10 / rust-command-line-utilities.markdown
Last active July 28, 2025 17:08
A curated list of command-line utilities written in Rust

A curated list of command-line utilities written in Rust

Note: I have moved this list to a proper repository. I'll leave this gist up, but it won't be updated. To submit an idea, open a PR on the repo.

Note that I have not tried all of these personally, and cannot and do not vouch for all of the tools listed here. In most cases, the descriptions here are copied directly from their code repos. Some may have been abandoned. Investigate before installing/using.

The ones I use regularly include: bat, dust, fd, fend, hyperfine, miniserve, ripgrep, just, cargo-audit and cargo-wipe.

  • atuin: "Magical shell history"
  • bandwhich: Terminal bandwidth utilization tool
@yukiarrr
yukiarrr / nested-stack-diff.sh
Created March 14, 2021 19:04
Check NestedStack diffs
#!/bin/bash -e
cdk synth > /dev/null
color=${1:-'--color'}
for stack_name in ${YOUR_PARENT_STACK_NAMES}; do
resources=$(aws cloudformation list-stack-resources --stack-name ${stack_name})
length=$(echo ${resources} | jq '.StackResourceSummaries | length')
@automagictv
automagictv / automatic_invoice.gs
Created February 5, 2021 21:13
Apps Script code to automatically replace template variables in your invoice document.
///////////////////////////////////////////////////////////////////////////////////////////////
// BEGIN EDITS ////////////////////////////////////////////////////////////////////////////////
const TEMPLATE_FILE_ID = 'YOUR_TEMPLATE_FILE_ID_HERE';
const DESTINATION_FOLDER_ID = 'YOUR_DESTINATION_FOLDER_ID_HERE';
const CURRENCY_SIGN = '$';
// END EDITS //////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////
// WARNING: EDITING ANYTHING BELOW THIS LINE WILL CHANGE THE BEHAVIOR OF THE SCRIPT. //////////
@rwiggins
rwiggins / s3_bucket_stats.py
Last active April 28, 2025 13:39
Lists the storage size (for all storage types) and tags of all S3 buckets in an account using CloudWatch's GetMetricStatistics. Uses the default AWS credentials in your environment. (See awscli configuration for more information.)
import boto3
import botocore
import datetime
import progressbar
import itertools
# from https://docs.aws.amazon.com/AmazonS3/latest/dev/cloudwatch-monitoring.html
STORAGE_TYPES = [
"StandardStorage",
"IntelligentTieringStorage",
@avoidik
avoidik / README.md
Created October 29, 2018 07:37
AWS query examples

Top 10 Examples of AWS CLI Query

List Volumes showing attachment using Dictionary Notation

$ aws ec2 describe-volumes \
  --query 'Volumes[*].{ID:VolumeId,InstanceId:Attachments[0].InstanceId,AZ:AvailabilityZone,Size:Size}'
[
    {
        "InstanceId": "i-a071c394",
@nimatt
nimatt / _installation.md
Last active November 11, 2017 10:55
Kaggle miljö info

Miljö för Kaggle-aktivitet

Det finns en uppsjö av verktyg, språk och bibliotek som kan användas för olika typer av ML. För att vi ska få en gemensam bas så kommer vi att de första två dagarna att utgå ifrån några av de vanligaste, Python och Tensorflow.

Runtime

Nedan kommer två olika sätt att sätta upp detta på din dator, Docker och Anaconda. Docker är det som kommer att ha minst inverkan på din dator (särkilt om du redan har Docker installerat) medan Anaconda ger en mer integrerad upplevelse. En nackdel med att använda sig av Docker är att det inte kommer att finnas någon möjlighet att plotta data.

Docker

Docker finns för Windows, Mac och Linux och kan hämtas här. Docker for Windows kräver Hyper-V vilket medför att virtualisering måste vara påslaget i BIOS samt att det krävs Windows 10 Pro eller Enterprise.

@diegopacheco
diegopacheco / jvmtop-linux-java.md
Last active August 17, 2022 12:17
How to install and use JvmTOP?
wget https://github.com/patric-r/jvmtop/releases/download/0.8.0/jvmtop-0.8.0.tar.gz
tar -xzvf jvmtop-0.8.0.tar.gz
rm -rf jvmtop-0.8.0.tar.gz
chmod +x jvmtop.sh
./jvmtop.sh

More on: https://github.com/patric-r/jvmtop