Skip to content

Instantly share code, notes, and snippets.

@bjarneo
bjarneo / vantablack.lua
Last active March 9, 2026 16:24
vantablack
return {
{
"bjarneo/aether.nvim",
branch = "v2",
name = "aether",
priority = 1000,
opts = {
transparent = false,
colors = {
-- Background colors
@aadishv
aadishv / claude-style.ts
Created January 25, 2026 20:18
the power of vibe coding!!
import type { ExtensionAPI } from "@mariozechner/pi-coding-agent";
import { truncateToWidth } from "@mariozechner/pi-tui";
import * as path from "node:path";
export default function (pi: ExtensionAPI) {
pi.on("session_start", async (_event, ctx) => {
if (!ctx.hasUI) return;
ctx.ui.custom((tui, theme, _kb, done) => {
const isAssistantComponent = (c: any) =>
@philliping
philliping / task-coordinator.md
Created July 26, 2025 11:56
task-coordinator.md

name: task-coordinator description: Use this agent when you need to manage, execute, or coordinate tasks using the Task Master system. This includes checking task status, starting new tasks, updating progress, completing tasks, and managing task dependencies. The agent should be invoked when users mention working on tasks, checking what to do next, or need help with task management workflows.\n\n\nContext: The user wants to start working on their project and needs to know what task to work on.\nuser: "What should I work on next?"\nassistant: "Let me check your current tasks and find what you should work on next."\n\nSince the user is asking about what to work on, use the Task tool to launch the task-controller agent to check task status and identify the next task.\n\n\n\n\nContext: The user has been implementing a feature and wants to update their progress.\nuser: "I've finished implementing the authentication system"\nassistant: "I'll use the task-cont

I want to solve the following problem, but I’m stuck.
Please act as a “cognitive centrifuge.”

  1. Break the problem into exactly four numbered sub-problems.
  2. For each sub-problem, give me one concrete micro-action I can do in under 2 minutes that will either (a) make the problem smaller, or (b) give me new information.
  3. After the four micro-actions, add a one-line “momentum booster” I can say out loud to prime my brain to keep going.
  4. Format the whole thing so I can read it in <15 seconds.

Problem:

@danielgross
danielgross / mathpix2gpt.py
Last active March 18, 2025 02:18
mathpix2gpt.py
import requests
import time
import os
import sys
import openai
import tiktoken
from termcolor import colored
openai.api_key = open(os.path.expanduser('~/.openai')).read().strip()
@mfd
mfd / teams.sh
Last active March 11, 2026 18:23
Download any video from Microsoft Teams, SharePoint and OneDrive
2teams() {
NOW=$(date +"%Y-%m-%d_%H%M")
if [ ! -z $2 ] ; then
echo $NOW"_"$2.mp4
ffmpeg -i $1 -codec copy $NOW"_"$2.mp4
else
echo $NOW"_teamsvid".mp4
ffmpeg -i $1 -codec copy $NOW"_teamsvideo".mp4
fi
}
@kk-r
kk-r / pre-commit
Last active May 29, 2018 07:50
Git pre-commit Hook for PHPCS standards ( copy and paste inside your project .git/hooks/pre-commit file). Please make sure pre-commit file should have permission to execute. And simply add this directory to your PATH in your ~/.bash_profile (or ~/.bashrc) like this: ` export PATH=~/.composer/vendor/bin:$PATH `
PROJECT=`php -r "echo dirname(dirname(dirname(realpath('$0'))));"`
STAGED_FILES_CMD=`git diff --cached --name-only --diff-filter=ACMR HEAD | grep \\\\.php`
# Determine if a file list is passed
if [ "$#" -eq 1 ]
then
oIFS=$IFS
IFS='
'
SFILES="$1"
@prenagha
prenagha / init.lua
Created September 30, 2016 00:36
Hammerspoon Config File, Hyper Key, Karabiner-Elements
-- hattip https://github.com/lodestone/hyper-hacks
-- hattip https://gist.github.com/ttscoff/cce98a711b5476166792d5e6f1ac5907
-- A global variable for the sub-key Hyper Mode
k = hs.hotkey.modal.new({}, 'F18')
-- Hyper+key for all the below are setup somewhere
-- The handler already exists, usually in Keyboard Maestro
-- we just have to get the right keystroke sent
@denji
denji / nginx-tuning.md
Last active March 12, 2026 21:03
NGINX tuning for best performance

NGINX Tuning For Best Performance

For this configuration you can use web server you like, i decided, because i work mostly with it to use nginx.

Generally, properly configured nginx can handle up to 400K to 500K requests per second (clustered), most what i saw is 50K to 80K (non-clustered) requests per second and 30% CPU load, course, this was 2 x Intel Xeon with HyperThreading enabled, but it can work without problem on slower machines.

You must understand that this config is used in testing environment and not in production so you will need to find a way to implement most of those features best possible for your servers.