Skip to content

Instantly share code, notes, and snippets.

@mpursley
mpursley / web-servers.md
Created May 11, 2020 17:37 — forked from willurd/web-servers.md
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@mpursley
mpursley / nginx_exporter.md
Last active December 6, 2019 00:17 — forked from mattpr/nginx_exporter.md
using mtail and nginx access_log to export custom metrics from nginx for prometheus and other monitoring scrapers

Feedback

I'm sure I've gotten multiple things wrong here. Either flat out wrong, anti-patterns or just sub-optimal. I'm new to prometheus, grafana and mtail...so please feel free to share corrections/suggestions.

Background

There are a handful of custom nginx stats exporters.

Some are tying into internal nginx stats like the official nginx exporter: nginx-prometheus-exporter

@mpursley
mpursley / main.py
Created September 24, 2018 20:47 — forked from gear11/main.py
Simple Python proxy server based on Flask and Requests. See: http:/python-proxy-server/gear11.com/2013/12/python-proxy-server/
"""
A simple proxy server. Usage:
http://hostname:port/p/(URL to be proxied, minus protocol)
For example:
http://localhost:8080/p/www.google.com
"""
@mpursley
mpursley / main.py
Created September 24, 2018 20:47 — forked from gear11/main.py
Simple Python proxy server based on Flask and Requests. See: http:/python-proxy-server/gear11.com/2013/12/python-proxy-server/
"""
A simple proxy server. Usage:
http://hostname:port/p/(URL to be proxied, minus protocol)
For example:
http://localhost:8080/p/www.google.com
"""
@mpursley
mpursley / atom-install-mac-osx.md
Last active December 7, 2017 20:48 — forked from Aenohe/atom-install-mac-osx.md
Atom install on Mac OSX

#Atom install on Mac OSX

##Requirements

###Homebrew

If you already have Homebrew skip this part or take a moment to update Homebrew with $ brew update

  • Install Homebrew $ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"