Skip to content

Instantly share code, notes, and snippets.

@cheton
cheton / theme-preset.js
Last active December 27, 2019 10:42
(Draft) Trend Micro Frontend Theme
const breakpoints = [
'320px',
'640px',
'1024px',
'1280px',
'1680px',
];
// @media screen and (min-width: 320px)
// @media screen and (min-width: 640px)
// @media screen and (min-width: 1024px)
@cheton
cheton / init.vim
Created February 5, 2020 09:39
Neovim
" Convert new tabs to spaces
set expandtab
set shiftwidth=4
set softtabstop=4
set tabstop=4
" No end of line
set noeol
call plug#begin()
@cheton
cheton / machine.js
Created May 21, 2020 14:58
Generated by XState Viz: https://xstate.js.org/viz
const fetchMachine = Machine({
id: 'fetchMachine',
initial: 'idle',
context: {
isFetchedOnce: false,
isFetching: false,
data: null,
error: null,
},
states: {
@cheton
cheton / distributed-mediasoup.js
Created August 5, 2022 04:34 — forked from gurupras/distributed-mediasoup.js
mediasoup horizontal scaling
onServerStartup () {
const { serverId, ip } = getServerInfo() // serverId does not change across restarts
this.serverId = serverId
// We don't have any routers or producers (yet). Clear any value that exists in the DB related to our serverId
clearSharedDB(serverId, 'routers')
clearSharedDB(serverId, 'producers')
// Update the DB with our serverId and ip so that others will know how to reach us
registerServerInDB(serverId, ip)
@cheton
cheton / README.md
Last active August 22, 2026 10:43
Agentic Development Setup Generator

Agentic Development Setup Generator

Overview

This project provides a repository-aware prompt for setting up agentic development rules.

The prompt asks an AI to inspect the repository first and generate a complete development setup based on the repository's existing tools, workflows, conventions, and verification mechanisms.

The generated setup may include: