This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Claude Code PostToolUse Hook for Auto-formatting and Linting | |
# | |
# This script integrates with Claude Code's hook system to automatically | |
# format and lint files after they're edited or created. | |
# | |
# How it works: | |
# 1. Claude Code calls this script after Write/Edit/MultiEdit|Update operations | |
# 2. The script receives JSON input via stdin containing: | |
# - session_id: Current Claude session |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -euo pipefail | |
# Get cost and usage data from AWS Cost Explorer | |
result=$(aws ce get-cost-and-usage --no-cli-pager \ | |
--time-period Start=$(date -d '7 days ago' '+%Y-%m-%d'),End=$(date '+%Y-%m-%d') \ | |
--granularity DAILY \ | |
--metrics "BlendedCost" "UsageQuantity" \ | |
--group-by Type=DIMENSION,Key=SERVICE) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -euo pipefail | |
# Get cost and usage data from AWS Cost Explorer | |
result=$(aws ce get-cost-and-usage --no-cli-pager \ | |
--time-period Start=$(date -d '7 days ago' '+%Y-%m-%d'),End=$(date '+%Y-%m-%d') \ | |
--granularity DAILY \ | |
--metrics "BlendedCost" "UsageQuantity" \ | |
--group-by Type=DIMENSION,Key=SERVICE) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Install + configure https://github.com/di-sukharev/opencommit | |
# Use ocp for quick git add + commit + push | |
function ocp() { | |
local remote="$1" | |
git add -A | |
oco --yes | |
if [ -n "$remote" ]; then | |
git push "$remote" | |
else | |
git push |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
!/bin/sh | |
# Kitty fzf to tab! | |
# Author: Ariel Frischer | |
# Add below mapping to your kitty.conf file (usually in ~/.config/kitty/) | |
# map super+j launch --type=overlay --stdin-source=@screen_scrollback /PATH_OF_THIS_FILE/fzf-kitty-tabs.sh | |
active_tab="$( | |
kitty @ ls | jq -r ' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
USERNAME="GITHUB-USERNAME" | |
# Download github cli -> https://cli.github.com/ | |
# You may need to run: | |
# chmod +x delete_forked_repos.sh | |
# gh auth login | |
# gh auth refresh -h github.com -s delete_repo |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// an example to create a new mapping `ctrl-y` | |
//map('<ctrl-y>', 'Show me the money', function() { // Front.showPopup('a well-known phrase uttered by characters in the 1996 film Jerry Maguire (Escape to close).'); //}); // an example to replace `T` with `gt`, click `Default mappings` to see how `T` works. //jmap('gt', 'T'); // an example to remove mapkey `Ctrl-i` //unmap('<ctrl-i>'); | |
// set theme | |
// ---- Hints ---- | |
// Hints have to be defined separately | |
// Uncomment to enable | |
// Fix Color Issues while using DarkReader extension! | |
api.Hints.style( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
########################### | |
# ~/.tmux.conf for iTerm2 # | |
# # | |
# by Jovian Lin # | |
########################### | |
########## | |
# Basics # | |
########## |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export const RGB_COLOR_REGEX = /\((\d+),\s*(\d+),\s*(\d+)(,\s*(\d*.\d*))?\)/; | |
export class Color { | |
public r: number; | |
public g: number; | |
public b: number; | |
public a: number; | |
constructor() | |
constructor(colorStr?: string) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo yum install autoconf automake bzip2 bzip2-devel cmake freetype-devel gcc gcc-c++ git libtool make mercurial pkgconfig zlib-devel -y | |
mkdir ~/ffmpeg_sources | |
# nasm | |
cd ~/ffmpeg_sources | |
curl -O -L https://www.nasm.us/pub/nasm/releasebuilds/2.14.02/nasm-2.14.02.tar.bz2 | |
tar xjvf nasm-2.14.02.tar.bz2 | |
cd nasm-2.14.02 | |
./autogen.sh | |
./configure --prefix="$HOME/ffmpeg_build" --bindir="$HOME/bin" |
NewerOlder