Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env zsh
# Worktree Manager (zsh) — v2
# - Sourceable from .zshrc (no copy/paste edits needed)
# - Auto-detects current git repo (no <project> arg)
# - Supports deep trees (mirrors repo path under W_WORKTREES_DIR)
# - Trailing-slash normalization + newline-safe parsing
# - Safer branch handling (reuse local/remote if present)
# - Inline completion (no external file)
# =========
#!/usr/bin/env zsh
# Multi-project worktree manager with Claude support
#
# ASSUMPTIONS & SETUP:
# - Your git projects live in: ~/projects/
# - Worktrees will be created in: ~/projects/worktrees/<project>/<branch>
# - New branches will be named: <your-username>/<feature-name>
#
# DIRECTORY STRUCTURE EXAMPLE:
# ~/projects/
@t3dotgg
t3dotgg / try-catch.ts
Last active October 30, 2025 15:10
Theo's preferred way of handling try/catch in TypeScript
// Types for the result object with discriminated union
type Success<T> = {
data: T;
error: null;
};
type Failure<E> = {
data: null;
error: E;
};
@Kavan72
Kavan72 / endpoints.txt
Last active October 14, 2025 19:52
Valorant endpoints
[PlayerFeedback_CheckForSurvey] POST
[PlayerFeedback_SendAnswers] POST
[PatchNotes_GetPatchNotes] GET
[AggStats_Fetch] GET
[AccountXP_GetPlayer] GET https://pd.ap.a.pvp.net/account-xp/v1/players/{user_id}
[Config_FetchConfig] GET https://shared.ap.a.pvp.net/v1/config/ap
@Alzemiro
Alzemiro / system.yaml
Created September 26, 2020 22:50
Riot Games
---
app:
app_name: LeagueClient
local_settings_file: Config/LeagueClientSettings.yaml
log_dir: LeagueClient Logs
project: leagueclient
respawn:
command: LeagueClient.exe
display_name: League of Legends
splash: lol
@esa1975
esa1975 / Compile imwheel on Solus.md
Last active November 5, 2021 09:10
Compile imwheel on Solus
@MrPh1l
MrPh1l / rl-api.md
Last active March 20, 2022 16:52 — forked from hansihe/rl-api.md
Rocket League API Documentation

#Rocket League API

Endpoints

All requests seem to be to the domain https://psyonix-rl.appspot.com. There are several endpoints on this domain.

Endpoint Purpose
/callproc105/ Leaderboard, player statistics
/Population/GetPopulation/ Player counts/regions
/auth/ Authentication, obtaining session ids
package despotoski.nikola.appbarlayoutsamples.view;
import android.animation.IntEvaluator;
import android.animation.ValueAnimator;
import android.content.Context;
import android.content.res.TypedArray;
import android.support.design.widget.AppBarLayout;
import android.support.design.widget.CoordinatorLayout;
import android.support.v4.view.ViewCompat;
import android.support.v4.view.ViewPropertyAnimatorCompat;
@enginefeeder101
enginefeeder101 / testports.sh
Created November 17, 2015 21:20
Test outgoing open ports
#!/bin/bash
task(){
LC_ALL=C nc -vzw5 portquiz.net $1 2>&1 | grep -v 'Connection timed out'
}
N=50 # Specify number of ports to check at once
(
for port in {1..65535}; do # Specify port range to check here
((i=i%N)); ((i++==0)) && wait
@mttkay
mttkay / Pager.java
Created November 4, 2015 15:46
A simple Rx based pager
public class Pager<I, O> {
private static final Observable FINISH_SEQUENCE = Observable.never();
private PublishSubject<Observable<I>> pages;
private Observable<I> nextPage = finish();
private Subscription subscription = Subscriptions.empty();
private final PagingFunction<I> pagingFunction;
private final Func1<I, O> pageTransformer;