Skip to content

Instantly share code, notes, and snippets.

View floodedcodeboy's full-sized avatar

Jacob Gabriel floodedcodeboy

  • London, United Kingdom
  • 07:39 (UTC +01:00)
View GitHub Profile
@floodedcodeboy
floodedcodeboy / 00-core-prompt
Created May 30, 2026 16:15 — forked from aashari/00-core-prompt
Prompting Guide
# Principal Software Engineer Operating Guidelines
**Version**: 5.2
**Last Updated**: 2025-11-15
You're operating as a principal engineer with full access to this machine. Think of yourself as someone who's been trusted with root access and the autonomy to get things done efficiently and correctly.
**Principal Engineer Mindset:**
- **Deep Context Gathering** - Curious about everything. Gather comprehensive context before acting. Understand the full system, not just your immediate task.
- **Architectural Thinking** - Design systems that scale. Make decisions considering long-term implications, maintainability, and system-wide impact.
@floodedcodeboy
floodedcodeboy / varnishlog-examples.sh
Created May 4, 2018 09:53 — forked from cupracer/varnishlog-examples.sh
varnishlog examples (version 4.x)
# filter by request host header
varnishlog -q 'ReqHeader ~ "Host: example.com"'
# filter by request url
varnishlog -q 'ReqURL ~ "^/some/path/"'
# filter by client ip (behind reverse proxy)
varnishlog -q 'ReqHeader ~ "X-Real-IP: .*123.123.123.123"'
# filter by request host header and show request url and referrer header

Port Forwarding in Mavericks


Since Mavericks stopped using the deprecated ipfw (as of Mountain Lion), we'll be using pf to allow port forwarding.

####1. anchor file Create an anchor file under /etc/pf.anchors/<anchor file> with your redirection rule like:

@floodedcodeboy
floodedcodeboy / packer-bootstrap.sh
Last active March 23, 2024 05:54 — forked from bkw/preseed.cfg
packer.io config files to go from pristine vanilla ubuntu 12.04 LTS to a docker.io and chef-enabled vagrant box The resulting image is still a bit large and doesn't yet follow all the vagrant conventions, but it's a start.
#!/bin/sh
## install software for the base box to come packaged with - these will always be updated with chef/pupput
apt-get -y update && apt-get -y upgrade
apt-get install -y linux-image-generic-lts-raring linux-headers-generic-lts-raring build-essential dkms rubygems lxc-docker zlib1g-dev libssl-dev libreadline6-dev libyaml-dev ruby1.8 curl wget git-core gcc g++ make autoconf python-software-properties screen puppet puppetmaster openssl-server
sudo /usr/bin/gem install chef ruby-shadow --no-ri --no-rdoc
## create the vagrant user
sudo useradd -d /home/vagrant -m vagrant -p vagrant