Skip to content

Instantly share code, notes, and snippets.

View jeffmicklos's full-sized avatar

Jeff Micklos jeffmicklos

View GitHub Profile
@eklitzke
eklitzke / mem.sh
Created July 23, 2012 15:45
find allocated memory for a process
#!/bin/bash
#
# Get "allocated" memory for a process (not including shmem!)
pmap $1 | egrep ' anon|stack ' | awk '{s += $2} END {printf "%1.1fM\n", s / 1024.}'
@cowboy
cowboy / HEY-YOU.md
Last active October 25, 2024 15:29
jQuery Tiny Pub/Sub: A really, really, REALLY tiny pub/sub implementation for jQuery.
@apinstein
apinstein / ipfw bandwidth throttle.sh
Created August 3, 2009 19:38
ipfw bandwidth throttling
#!/bin/sh
#
# Use ipfw to throttle bandwidth.
# usage:
# ./throttle.sh # Throttle at default (60KB/s)
# ./throttle.sh 5 # Throttle at custom speed (5KB/s)
# ./throttle.sh off # Turn throttling off
# flush rules
ipfw del pipe 1