Skip to content

Instantly share code, notes, and snippets.

View ssskip's full-sized avatar
💭
I may be slow to respond.

ssskip

💭
I may be slow to respond.
View GitHub Profile
@ssskip
ssskip / claude-code-prompt-cache-and-compact.md
Created May 16, 2026 05:25
How does Claude Code Prompt Cache & Compact Works

How does Claude Code Prompt Cache & Compact Works

This document describes how Claude Code manages Anthropic's prompt cache, performs context compaction (summarization) without losing user task context, and structures its system prompt for maximum cache efficiency.

Big-Picture Architecture

┌──────────────────────────────────────────────────────────────────────────┐
│                         CLAUDE CODE TURN LIFE CYCLE                      │
│                                                                          │
@ssskip
ssskip / homograph_normalize.py
Created November 26, 2024 03:44
Normalize text by replacing similar characters(virtual similar words) with their standard form.
import re
# Dictionary mapping similar characters include unicode to their normalized form
CHAR_MAPPINGS = {
# Map variations of 'a' to 'a'
'a': r"[a4@àáâäãåαаǎăąāạⱥₐᵃᴀꙺꬱ\u0251\u1D41A\u1D44E\u1D482\u1D4B6\u1D4EA\u1D51E\u1D552\u1D586\u1D5BA\u1D5EE\u1D622\u1D656\u1D68A]",
# Map variations of 'b' to 'b'
'b': r"[b6ƀɓḃḅḇƃȸ\u1D41\u1D45\u1D79\u1D7D\u1D422\u1D456\u1D48A\u1D4BE\u1D4F2\u1D526\u1D55A\u1D58E\u1D5C2]",
@ssskip
ssskip / GreatTests.md
Created February 19, 2022 04:25
what is great test

Great Tests

  • Test on thing
  • If that things break,only one test fails
  • Repeatable
  • Don't rely on run order
  • Don't require external resources
@ssskip
ssskip / README.md
Last active February 16, 2022 08:31
Computer Program Efficiency Optimizing Best Practice

Computer Program Efficiency Optimizing Best Practice.

Why Do?

  • High impact, High value if fixed.
  • Valid, Required functionality
  • We can set reasonable efficiency
  • Nothing more important
@ssskip
ssskip / getDisplayMedia.js
Created December 1, 2020 13:44
getDisplayMedia (prefers detail over fluent video.)
/**
*
* @param {Object} [constraints={ video: true }] constraints - MediaStreamConstraints
* @returns {Promise<MediaStream>}
*/
export function getDisplayMedia(constraints = defaultDisplayMediaConstraints) {
return global.navigator.mediaDevices
.getDisplayMedia(constraints)
.then(stream => {
// support for Chrome's content hint stuff which prefers detail over fluent video.
@ssskip
ssskip / coturn.service
Last active October 27, 2020 12:43
coturn, systemd with reload & CAP_NET_BIND_SERVICE
[Unit]
Description=coTURN STUN/TURN Server
Documentation=man:coturn(1) man:turnadmin(1) man:turnserver(1)
After=network.target
[Service]
AmbientCapabilities=CAP_NET_BIND_SERVICE
User=turnserver
Group=turnserver
Type=forking
@ssskip
ssskip / README.md
Created May 5, 2019 14:19
build WebRTC

iOS bitcode not support yet

H264 Hardware Acceleration

Enabled by default for the latest builds of WebRTC

iOS Required

  • libresolv.tbd
  • AVFoundation.framework
  • CoreMedia.framework
@ssskip
ssskip / .gitlab-ci.yml
Last active December 18, 2025 12:52
gitlab-ci AWS ECS build & deploy
image: docker:latest
variables:
REPOSITORY_URL: xxx.dkr.ecr.us-west-2.amazonaws.com/xxx
REGION: us-west-2
TASK_DEFINTION_NAME: xxx
CLUSTER_NAME: xxx
SERVICE_NAME: xxx
services:
@ssskip
ssskip / README.md
Created December 4, 2018 06:20
open file limit ECS

Configuring Linux usage limits with Docker and AWS ECS

  • ECS TASK Definitions.
"containerDefinitions": [
    {
...
      "ulimits": [
 {
@ssskip
ssskip / P12toPEM.txt
Created May 2, 2018 08:13 — forked from shahdhiren/P12toPEM.txt
Convert P12 file for Push Notification to PEM format
Development Phase:
Step 1: Create Certificate .pem from Certificate .p12
Command: openssl pkcs12 -clcerts -nokeys -out apns-dev-cert.pem -in apns-dev-cert.p12
Step 2: Create Key .pem from Key .p12
Command : openssl pkcs12 -nocerts -out apns-dev-key.pem -in apns-dev-key.p12
Step 3: Optional (If you want to remove pass phrase asked in second step)
Command : openssl rsa -in apns-dev-key.pem -out apns-dev-key-noenc.pem