Skip to content

Instantly share code, notes, and snippets.

@leesmith
leesmith / commit-message-syntax.txt
Created December 31, 2011 06:05
Pivotal Tracker post-commit message syntax
https://www.pivotaltracker.com/help/api?version=v3#github_hooks
https://www.pivotaltracker.com/help/api?version=v3#scm_post_commit_message_syntax
SCM Post-Commit Message Syntax
To associate an SCM commit with a specific Tracker story, you must include a special syntax in the commit message to indicate one or more story IDs and (optionally) a state change for the story. Your commit message should have square brackets containing a hash mark followed by the story ID. If a story was not already started (it was in the "not started" state), a commit message will automatically start it. For example, if Scotty uses the following message when committing SCM revision 54321:
[#12345677 #12345678] Diverting power from warp drive to torpedoes.
@RunnerRick
RunnerRick / captureHttp.sh
Last active June 14, 2017 05:54
Using TCPDUMP to monitor incoming HTTP traffic (poor man's Wireshark).
#!/usr/bin/env bash
echo $1 | grep -E -q "^[0-9]+$" || (echo "Please specify a port number to listen to." ; exit 1)
PORT=$1
TCPDUMPARG="tcp port $PORT and (((ip[2:2] - ((ip[0]&0xf)<<2)) - ((tcp[12]&0xf0)>>2)) != 0)"
sudo tcpdump -s 0 -A -i lo0 $TCPDUMPARG
@mdonkers
mdonkers / server.py
Last active June 25, 2024 18:48
Simple Python 3 HTTP server for logging all GET and POST requests
#!/usr/bin/env python3
"""
License: MIT License
Copyright (c) 2023 Miel Donkers
Very simple HTTP server in python for logging requests
Usage::
./server.py [<port>]
"""
from http.server import BaseHTTPRequestHandler, HTTPServer