Skip to content

Instantly share code, notes, and snippets.

View supergithubo's full-sized avatar
💭
busy

Nate Owle supergithubo

💭
busy
  • Ilocos Region, Philippines
View GitHub Profile
@supergithubo
supergithubo / token_analysis.py
Created April 12, 2026 02:58 — forked from kieranklaassen/token_analysis.py
Claude Code token usage analyzer - breaks down usage by project, session, and subagent
#!/usr/bin/env python3
"""
Claude Code token usage analyzer.
Analyzes ~/.claude/projects/ JSONL files for token usage patterns.
"""
import json
import os
import sys
from pathlib import Path
{
"schemaVersion": "1",
"user": {
"name": "Hi, I'm Winston!",
"title": "Full-Stack Developer",
"tagline": "A <span class=\"underline underline-offset-4 decoration-2 decoration-orange-500 hover:bg-orange-500 hover:text-white hover:no-underline transition-all duration-200 px-1\">full-stack</span> developer helping <span class=\"underline underline-offset-4 decoration-2 decoration-yellow-500 hover:bg-yellow-500 hover:text-white hover:no-underline transition-all duration-200 px-1\">businesses</span> turn messy processes into clean, scalable systems. Outside client work, I spend my time building productivity tools, exploring AI and blockchain infra, and also running a small business as a side quest.",
"email": "winston.los.santos@gmail.com",
"links": [
{
"label": "GitHub",
@supergithubo
supergithubo / Ubuntu 16 Update Expired Packages
Created January 22, 2018 07:31
Ubuntu 16 Update Expired Packages
for K in $(apt-key list | grep expired | cut -d'/' -f2 | cut -d' ' -f1); do sudo apt-key adv --recv-keys --keyserver keys.gnupg.net $K; done
Reference: https://serverfault.com/questions/7145/what-should-i-do-when-i-got-the-keyexpired-error-message-after-an-apt-get-update
cat *.gz > file
mv file file.gz
zcat file.gz
gzip -d file.gz
nano file
@supergithubo
supergithubo / Async Parallel
Last active September 28, 2017 08:53
Async Parallel Execution Flow
//http://caolan.github.io/async/
var async = require('async');
var time;
(function() {
time = setInterval(function() {
console.log('blocking...\n');
}, 1000);
})();
@supergithubo
supergithubo / Async Series
Last active September 28, 2017 08:54
Async Series Execution Flow
//http://caolan.github.io/async/
var async = require('async');
var time;
(function() {
time = setInterval(function() {
console.log('blocking...\n');
}, 1000);
@supergithubo
supergithubo / apache-tuning-max-clients.sh
Last active June 17, 2017 11:22
Apache Tuning (Max Clients/Request Workers)
#!/bin/bash
# This script is intended to determine apache memory footprint.
# This footprint can be used to set MaxClients/MaxRequestWorkers values
# Set a value between average and max values for best results.
# Values are subject to change under load. Run under different loads.
# comments to http://www.cirgan.net
httpdname=$(netstat -tunalp | grep :80| grep "/" | awk '{print $7'} | cut -d "/" -f2 | tail -n 1)
div=1024
totmem=$(free -m | grep -i mem | awk '{print $2}')
@supergithubo
supergithubo / Public Directory File Permssion (Apache2 + FTP | Linux)
Last active June 5, 2017 13:29
Public Directory File Permssion (Apache2 + FTP | Linux)
- Create a new group (www-pub) and add the users to that group
groupadd www-pub
usermod -a -G www-pub www-data #apache
usermod -a -G www-pub ubuntu #ec2 user / ftp user
- Change the ownership of everything under /var/www to root:www-pub
chown root:www-pub /var/www -R
- Change the permissions of all the folders to 2775 and files to 0664 (instead of 2755/0644 to allow group write access)
chmod 2775 /var/www