Skip to content

Instantly share code, notes, and snippets.

View connorads's full-sized avatar

Connor Adams connorads

View GitHub Profile
@connorads
connorads / README.md
Created September 27, 2024 15:07
Compress a .gif

Too big to upload somewhere, why not compress with gifsicle?

gifsicle --lossy=200 --scale 0.6 Screen\ Cast\ 2024-09-27\ at\ 3.59.08\ PM.gif -o compressed.gif 
@connorads
connorads / assume.md
Last active October 8, 2024 08:01
assume (granted.dev)
# Add AWS profiles in ~/.aws/config 
granted sso populate --sso-region eu-west-1 https://yourawsssosubdomain.awsapps.com/start

# Login in shell
assume

# Check who you're logged in as
aws sts get-caller-identity
@connorads
connorads / promiseWithTimeout.ts
Created September 25, 2020 10:47
Wrapping a promise with a timeout in Typescript (adapted from https://bit.ly/3j1fmli)
export class TimeoutError extends Error {
constructor(message: string) {
super(message);
this.name = "TimeoutError";
}
}
export const promiseWithTimeout = <T>({
ms,
promise,