Skip to content

Instantly share code, notes, and snippets.

View duyet's full-sized avatar

duyet duyet

View GitHub Profile
@duyet
duyet / fix-and-push.md
Created September 16, 2025 05:24
Claude Commands
allowed-tools description
Read
Bash
Glob
TodoWrite
Edit
Write
Do the task or fixing tests, commit and push

/fix-and-push - Fix tests, commit changes, and run git push

Purpose

Execute tests, fix the failed tests, run all tests to make sure the fixes are successful, commit the changes, and run git push to update the current branch with remote.

@duyet
duyet / README.md
Last active August 11, 2025 08:33
Claude Code Statusline

~/.claude/settings.json

{
  ... your settings ...

  "statusLine": {
    "type": "command",
    "command": "npx -y ccusage@latest statusline"
 }

An MCP server implementation that provides a tool for dynamic and reflective problem-solving through a structured thinking process.

claude mcp add-json sequential-thinking '{
  "type": "stdio",
  "command": "npx",
  "args": [
    "-y",
@duyet
duyet / Apple_mobile_device_types.txt
Created January 4, 2023 04:52 — forked from adamawolf/Apple_mobile_device_types.txt
List of Apple's mobile device codes types a.k.a. machine ids (e.g. `iPhone1,1`, `Watch1,1`, etc.) and their matching product names
i386 : iPhone Simulator
x86_64 : iPhone Simulator
arm64 : iPhone Simulator
iPhone1,1 : iPhone
iPhone1,2 : iPhone 3G
iPhone2,1 : iPhone 3GS
iPhone3,1 : iPhone 4
iPhone3,2 : iPhone 4 GSM Rev A
iPhone3,3 : iPhone 4 CDMA
iPhone4,1 : iPhone 4S
https://drive.google.com/file/d/148TyjP4q513ts19mNi6SnB6rNUgJWVo4/view?usp=sharing
@duyet
duyet / postgres_queries_and_commands.sql
Created May 9, 2022 14:07 — forked from rgreenjr/postgres_queries_and_commands.sql
Useful PostgreSQL Queries and Commands
-- show running queries (pre 9.2)
SELECT procpid, age(clock_timestamp(), query_start), usename, current_query
FROM pg_stat_activity
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%'
ORDER BY query_start desc;
-- show running queries (9.2)
SELECT pid, age(clock_timestamp(), query_start), usename, query
FROM pg_stat_activity
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%'
let resp = await fetch('http://wttr.in')
if (resp.ok) {
console.log(await resp.text())
}
from datetime import datetime
from airflow.models import DAG
from airflow.operators.dummy_operator import DummyOperator
from airflow.operators.python_operator import PythonOperator
DAG_OWNER = '[email protected]'
DAG_ID = 'dag_name'
SCHEDULE_INTERVAL = '@weekly'
@duyet
duyet / udp_server.py
Created January 3, 2020 04:56 — forked from majek/udp_server.py
Simple python udp server
import logging
import socket
log = logging.getLogger('udp_server')
def udp_server(host='127.0.0.1', port=1234):
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)