git fetch -p && for branch in $(git for-each-ref --format '%(refname) %(upstream:track)' refs/heads | awk '$2 == "[gone]" {sub("refs/heads/", "", $1); print $1}'); do git branch -D $branch; done
git reset HEAD^
git fetch -p && for branch in $(git for-each-ref --format '%(refname) %(upstream:track)' refs/heads | awk '$2 == "[gone]" {sub("refs/heads/", "", $1); print $1}'); do git branch -D $branch; done
git reset HEAD^
This script works with Karabiner Elements and OneKey Mute Button Edition.
When the button is pressed it performs one of these actions evaluated in this order:
#!/bin/bash | |
# Specify the desired volume size in GiB as a command-line argument. If not specified, default to 20 GiB. | |
SIZE=${1:-20} | |
# Get the ID of the environment host Amazon EC2 instance. | |
INSTANCEID=$(curl http://169.254.169.254/latest/meta-data//instance-id) | |
# Get the ID of the Amazon EBS volume associated with the instance. | |
VOLUMEID=$(aws ec2 describe-instances \ |
fpath+=$HOME/.zsh/pure | |
# Theme | |
# Commented since pure is used https://github.com/sindresorhus/pure | |
# ZSH_THEME="refined" | |
ZSH_THEME="" | |
autoload -U promptinit; promptinit | |
prompt pure | |
# Case-sensitive completion. |
AL2023 doesn't have a distribution for neovim, so you need to build it from source - for more info see here.
Install prerequisites:
sudo yum -y install ninja-build cmake gcc make unzip gettext curl git --allowerasing
Clone repository:
{ | |
"compilerOptions": { | |
"target": "ES2022", | |
"module": "NodeNext", | |
"moduleResolution": "NodeNext", | |
"lib": [ | |
"es2022" | |
], | |
"declaration": true, | |
"strict": true, |
{ | |
"$schema": "https://biomejs.dev/schemas/1.7.0/schema.json", | |
"organizeImports": { | |
"enabled": true | |
}, | |
"linter": { | |
"enabled": true, | |
"rules": { | |
"recommended": true | |
} |
import type { ClientRequest, IncomingMessage } from 'node:http'; | |
import { subscribe } from 'node:diagnostics_channel'; | |
public captureHTTPsGlobal(): void { | |
const onRequestStart = (message: unknown): void => { | |
const { request } = message as { request: ClientRequest }; | |
console.log(message); | |
const parentSubsegment = this.getSegment(); | |
if (parentSubsegment && request.host) { |
To deploy, create a Lambda function and enable function URL (no auth - yolo), then use the handler above in your function. That same implementation will also work with API Gateway HTTP (aka v2), if you want to use ALB or API Gateway REST (aka v1) you should swap the schema used for parsing.
Then you can test using a POST request with this body:
{
"jsonrpc": "2.0",
"method": "tools/list",
"id": 2
}