Skip to content

Instantly share code, notes, and snippets.

View kjj6198's full-sized avatar
๐Ÿ’ป
Tech always win

Kalan kjj6198

๐Ÿ’ป
Tech always win
View GitHub Profile
@kjj6198
kjj6198 / AGENTS.md
Last active September 15, 2026 14:51
My default AGENTS.md

Principles

  • Infer the user's intent and task scope from instructions and prior conversation context.
  • Choose the simplest implementation that fully solves the problem. Do not reimplement common functionality when a suitable library exists.
  • Prefer deleting code over adding code. The best code is code that does not need to exist.
  • Use established, maintained libraries when they reduce complexity or improve reliability.
  • Write self-explanatory code. Add comments only when the code cannot express the necessary context.
  • Before assuming a library lacks a capability, check its documentation, types, and source.
  • Build features end to end in small increments. Do not design for hypothetical future requirements.
  • Preserve backward compatibility only when required. Otherwise remove obsolete code instead of adding compatibility layers.
@kjj6198
kjj6198 / reset.css
Created June 15, 2023 02:10
CSS Reset
/*
1. Use a more-intuitive box-sizing model.
*/
*, *::before, *::after {
box-sizing: border-box;
}
/*
2. Remove default margin
*/
* {
@kjj6198
kjj6198 / fft.jl
Created November 1, 2021 01:44
FFT experiment
### A Pluto.jl notebook ###
# v0.16.1
using Markdown
using InteractiveUtils
# This Pluto notebook uses @bind for interactivity. When running this notebook outside of Pluto, the following 'mock version' of @bind gives bound variables a default value (instead of an error).
macro bind(def, element)
quote
local el = $(esc(element))
@kjj6198
kjj6198 / fft.ipynb
Created October 31, 2021 15:12
fft
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@kjj6198
kjj6198 / c_cpp_properties.json
Created September 11, 2021 14:08
vscode setup for arduino
{
"version": 4,
"configurations": [
{
"name": "Arduino",
"compilerPath": "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/avr-g++",
"compilerArgs": [
"-std=gnu++11",
"-fpermissive",
"-fno-exceptions",
curl -X POST -H "Content-Type: application/json" \
-H "Authorization: $token" YOUR_URL \
-d "{\"commandType:\": \"command\", \"command\": \"turnOff\" }"
@kjj6198
kjj6198 / css
Created April 25, 2020 02:28
Reboot CSS
*,
*::before,
*::after {
box-sizing: border-box;
}
html {
font-family: sans-serif;
line-height: 1.15;
-webkit-text-size-adjust: 100%;
Server arm = new Serverbuilder();
...
.service("/health", new ManagedHttpHealthCheckService())
.serverListner(
ConsulUpdatingListner.builder(config.getServerName(), config.getPort())
.address(config.getServerAddress())
.check(String.format("http://localhost:%d/health/", config.getPort()), 10, 5, 15)
.tag()
.build()
@kjj6198
kjj6198 / convert-audio
Created October 5, 2019 13:41
Convert aiff to mp3 shell by avconvert
#!/bin/sh
IFS=$'\n'
for INFILE in $(ls -1 MY_FILE)
do
baseFilename=`basename "${INFILE}" .aiff`
outfile="${baseFilename}.mp3"
@kjj6198
kjj6198 / countries.js
Last active November 5, 2017 09:17
Contries flag map
const countries = {
hongkong: '๐Ÿ‡ญ๐Ÿ‡ฐ',
'mainland china': '๐Ÿ‡จ๐Ÿ‡ณ',
japan: '๐Ÿ‡ฏ๐Ÿ‡ต',
korea: '๐Ÿ‡ฐ๐Ÿ‡ท',
india: '๐Ÿ‡ฎ๐Ÿ‡ณ',
malaysia: '๐Ÿ‡ฒ๐Ÿ‡พ',
indonesia: '๐Ÿ‡ฎ๐Ÿ‡ฉ',
philippines: '๐Ÿ‡ต๐Ÿ‡ญ',
canada: '๐Ÿ‡จ๐Ÿ‡ฆ',