This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| - 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/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}') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //http://caolan.github.io/async/ | |
| var async = require('async'); | |
| var time; | |
| (function() { | |
| time = setInterval(function() { | |
| console.log('blocking...\n'); | |
| }, 1000); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //http://caolan.github.io/async/ | |
| var async = require('async'); | |
| var time; | |
| (function() { | |
| time = setInterval(function() { | |
| console.log('blocking...\n'); | |
| }, 1000); | |
| })(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| cat *.gz > file | |
| mv file file.gz | |
| zcat file.gz | |
| gzip -d file.gz | |
| nano file |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "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", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/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 |