Skip to content

Instantly share code, notes, and snippets.

@stevenrouk
stevenrouk / next-task.md
Last active August 14, 2025 04:57
Claude Code commands for starting project documentation (/start-project), executing next tasks (/next-task), and updating documentation when task is complete (/update-task-documentation). Current working version -- last updated 2025-08-02.

Complete the next task from the plan in docs/start-here.md

Please look at docs/start-here.md and follow the instructions. Your job is to get the next task done. Ultimately, you are the one guiding the work and making sure it meets what it's supposed to do. Chunk the work into small pieces, when it's helpful.

First, review the necessary files, think carefully, review more, and then create a plan to create the next chunk of work. Output your plan for approval by me (the user) before proceeding. Pause after outputting the plan to wait for my input.

Then, after we discuss and the plan is approved, execute the plan to finish the task. Use subagents when helpful. Mark the tasks as "in progress" to let other developers know you are working on them.

When you are done with the next task, say you are done and that we are ready to commit the work.

@liviaerxin
liviaerxin / README.md
Last active August 20, 2025 01:06
FastAPI and Uvicorn Logging #python #fastapi #uvicorn #logging

FastAPI and Uvicorn Logging

When running FastAPI app, all the logs in console are from Uvicorn and they do not have timestamp and other useful information. As Uvicorn applies python logging module, we can override Uvicorn logging formatter by applying a new logging configuration.

Meanwhile, it's able to unify the your endpoints logging with the Uvicorn logging by configuring all of them in the config file log_conf.yaml.

Before overriding:

uvicorn main:app --reload
@chenasraf
chenasraf / README.md
Last active August 25, 2022 12:24
Java SDK version switcher

jver version switcher

A simple script to allow to switch easily between JDK versions on a single machine, in case several versions are needed.

Usage:

jver list # list all available versions in $BASE_DIR
jver 17 # switch to version 17
jver 17 -q # suppress output
@progrium
progrium / README.md
Last active July 19, 2025 19:41
Setting up M1 Macs for x86 development with Homebrew

Key Points

  • In general, binaries built just for x86 architecture will automatically be run in x86 mode
  • You can force apps in Rosetta 2 / x86 mode by right-clicking app, click Get Info, check "Open using Rosetta"
  • You can force command-line apps by prefixing with arch -x86_64, for example arch -x86_64 go
  • Running a shell in this mode means you don't have to prefix commands: arch -x86_64 zsh then go or whatever
  • Don't just immediately install Homebrew as usual. It should most likely be installed in x86 mode.

Homebrew

Not all toolchains and libraries properly support M1 arm64 chips just yet. Although

@mtimbs
mtimbs / tsconfig.json
Last active July 31, 2025 19:18
basic default tsconfig for use in TypeScript projects
{
"compilerOptions": {
// project options
"lib": [
"ESNext",
"dom"
], // specifies which default set of type definitions to use ("DOM", "ES6", etc)
"outDir": "lib", // .js (as well as .d.ts, .js.map, etc.) files will be emitted into this directory.,
"removeComments": true, // Strips all comments from TypeScript files when converting into JavaScript- you rarely read compiled code so this saves space
"target": "ES6", // Target environment. Most modern browsers support ES6, but you may want to set it to newer or older. (defaults to ES3)
curl https://archive.md/dXdvQ/c58b55674ef876f8b78d02c30a685561b6376981.png --output 01.png && \
curl https://archive.md/dXdvQ/4591a5caa74058c0ae18d71b5cc40ea41a6ea496.png --output 02.png; \
convert -depth 8 01.png rgb:ytdl01.part; \
convert -depth 8 02.png rgb:ytdl02.part; \
cat ytdl01.part ytdl02.part > youtube-dl2020.09.20.tar.gz; \
rm ytdl01.part ytdl02.part; \
clear; \
print 'sha256 checksum: \n'; \
sha256sum youtube-dl2020.09.20.tar.gz
@jordansinger
jordansinger / iPod.swift
Created July 27, 2020 21:19
Swift Playgrounds iPod Classic
import SwiftUI
import PlaygroundSupport
struct iPod: View {
var body: some View {
VStack(spacing: 40) {
Screen()
ClickWheel()
Spacer()
}
@cmorigaki
cmorigaki / MarginItemDecoration.kt
Created May 24, 2020 21:08
Margin Item Decoration (Simple)
class MarginItemDecoration(private val spaceSize: Int) : RecyclerView.ItemDecoration() {
override fun getItemOffsets(
outRect: Rect, view: View,
parent: RecyclerView,
state: RecyclerView.State
) {
with(outRect) {
if (parent.getChildAdapterPosition(view) == 0) {
top = spaceSize
}
@Lukas238
Lukas238 / 1_hyperv.bat
Created February 15, 2020 18:20
How to install Docker Desktop on Windows 10 Home edition and WSL2
pushd "%~dp0"
dir /b %SystemRoot%\servicing\Packages\*Hyper-V*.mum >hyper-v.txt
for /f %%i in ('findstr /i . hyper-v.txt 2^>nul') do dism /online /norestart /add-package:"%SystemRoot%\servicing\Packages\%%i"
del hyper-v.txt
Dism /online /enable-feature /featurename:Microsoft-Hyper-V -All /LimitAccess /ALL
pause