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
@sts10
sts10 / rust-command-line-utilities.markdown
Last active July 14, 2024 16:05
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 July 7, 2023 01:53
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

@vvzen
vvzen / OF_with_visual_studio_code.md
Last active August 17, 2023 02:59
A quick reminder on how to use openframeworks without XCode (macOS)

Using OpenFrameworks with Visual Studio Code (macOS)

  1. First, install the cpptools extension in studio code

  2. Then add the include paths in the c_cpp_properties.json file.

    If a small light bulb icon (💡) appears near the include statements on any of your source file, just click it in order to access the c_c_pp_properties.json file.

    If there's no 💡 icon, then in the project directory create a hidden folder called vscode:

@barbietunnie
barbietunnie / udemy-courses-download-using-cookies.md
Last active July 8, 2024 04:41
Downloading Udemy videos with youtube-dl

How to download your Udemy course videos using youtube-dl

$ youtube-dl --list-extractors | grep udemy

Steps

  1. Get link to the course to download. e.g. https://www.udemy.com/course-name/
  2. Login into udemy website, save the cookie from chrome using Chrome (Cookie.txt)[1] export extension. Save it to file udemy-cookies.txt
  3. Get the link of the video that you want to download. usually in format. Use the command provided below where you have to replace the {course_link} and {path_to_cookies_file} with respective paths.
$ youtube-dl {course_link} --cookies {path_to_cookies_file}