Skip to content

Instantly share code, notes, and snippets.

View tichopad's full-sized avatar
:shipit:

Michael Tichopad tichopad

:shipit:
View GitHub Profile
@tichopad
tichopad / nv
Last active September 19, 2022 08:09
Run arbitrary Node version via Docker
#!/bin/bash
# Example runs: `nv 17 ./script.js`, `nv latest yarn install`
# Get Node version
VERSION=$1
# Get the rest of the arguments
shift
ARGUMENTS=$@
docker run \
@tichopad
tichopad / gist.sh
Last active September 15, 2022 20:56
Enable Super + [1-9] shortcut for favorites in Gnome
for i in {1..9}; do gsettings set "org.gnome.shell.keybindings" "switch-to-application-$i" "[\"<Super>$i\"]"; done
@tichopad
tichopad / create-sentry-projects.ts
Created March 21, 2023 12:46
Bulk create Sentry Projects
import fs from 'fs/promises';
const SENTRY_API_KEY = 'enterapikeyhere';
const ORG_SLUG = 'enterorgslughere';
const TEAM_SLUG = 'enterteamnamehere';
const fetchSentry = (
path: string,
method: 'GET' | 'POST' | 'PUT' = 'GET',
body?: Record<string, any>,
@tichopad
tichopad / gary.jpg
Last active June 8, 2023 14:46
gary
gary.jpg
@tichopad
tichopad / list-all-named-imports.sh
Created September 6, 2024 15:10
List all named import from a package within a folder
grep -rh "import.*from '@myapp/mypackage'" ./somefolder/**/*.ts | sed -n "s/.*{\(.*\)}.*/\1/p" | tr ',' '\n' | sed 's/^ *//g' | sort -u
@tichopad
tichopad / list-todos.sh
Created November 28, 2024 14:49
Lists all TODO/FIXME comments in the current Git branch compared to master
#!/bin/bash
# Colors for output
RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
NC='\033[0m' # No Color
# Get the current branch name
current_branch=$(git rev-parse --abbrev-ref HEAD)
@tichopad
tichopad / list-reserved-concurrency.sh
Created March 6, 2025 11:22
List all AWS Lambda functions' reserved concurrency
#!/bin/bash
# Get all Lambda function names
function_names=$(aws lambda list-functions --query 'Functions[*].FunctionName' --output text)
echo "Lambda Functions with Reserved Concurrency:"
echo "-------------------------------------------"
# Check each function for reserved concurrency
for func in $function_names; do
@tichopad
tichopad / count_lines_changed.sh
Created April 11, 2025 10:11
Script to count total lines changed by a specific author in git history in a given time frame.
#!/bin/bash
# Script to count total lines changed by a specific author in git history
# Usage: ./count_lines_changed.sh -a "Author Name" -s "2024-01-01" -e "2025-04-10" -b "master"
# Default values
START_DATE="2024-01-01"
END_DATE="2025-04-10"
BRANCH="master"
AUTHOR=""
@tichopad
tichopad / top_files.sh
Created April 17, 2025 13:06
Script to find top 5 files an author spent most time in based on git history.
#!/bin/bash
# Script to find top 5 files an author spent most time in based on git history
# Usage: ./top_files.sh -a "Author Name" -s "2024-01-01" -e "2025-04-10" -b "master" -n 5
# Default values
START_DATE="2024-01-01"
END_DATE="2025-04-10"
BRANCH="master"
AUTHOR=""