$ curl http://localhost:5000/metrics
# HELP python_gc_objects_collected_total Objects collected during gc
# TYPE python_gc_objects_collected_total counter
python_gc_objects_collected_total{generation="0"} 317.0
python_gc_objects_collected_total{generation="1"} 71.0
python_gc_objects_collected_total{generation="2"} 0.0
# HELP python_gc_objects_uncollectable_total Uncollectable object found during GC
# TYPE python_gc_objects_uncollectable_total counter
python_gc_objects_uncollectable_total{generation="0"} 0.0
View flask_prometheus.md
View raspberry-pi-zero_as_webcam.md
hardware/software
Webcam parts:
- Raspberry Pi Zero W Rev 1.1
- Raspberry Pi Camera v2 (8-megapixel)
- Raspberry Pi High Quality Camera (12.3-megapixel)
- Raspbian Buster Lite 2020-02-13
Webcam works with:
- Windows 10
- Windows 10 "Camera" app
View openwrt-on-x86_64.md
OpenWRT on x86_64
This is a very brief tutorial on getting OpenWRT installed on a regular computer, it assumes you know your way around Linux. If you find this and need additional details, please like, subscribe, and comm... oh wait this isn't youtube, just comment.
This is how I got OpenWRT going on a Mini ITX Intel DH67CF with an Intel G870 CPU with 4GB of RAM.
What You'll Need
- 2 USB Sticks
- Linux Live ISO
View Gemfile
This file contains 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
source "https://rubygems.org" | |
gem "rack" | |
gem "rack-proxy" |
View ffmpeg.md
FFmpeg cheat sheet
A list of useful commands for the ffmpeg command line tool.
Download FFmpeg: https://www.ffmpeg.org/download.html
Full documentation: https://www.ffmpeg.org/ffmpeg.html
Basic conversion
View README-Highcharts-Webpack-Babel.md
A Highcharts example in use with Webpack and Babel.
Install
- Download source files
- Run
npm install
to install all dependencies. - Run
npm run build
to bundleapp.js
intobundle.js
Open application
- Open
index.html
in a browser.
View iptables.md
iptables cheat sheet
Concepts
iptables defines tables, which group features:
- filter: use it to filter traffic
- nat: use it to implement NAT
- raw: use it to define which connections iptables should track (stateful firewall)
- mangle: use it to change some fields in packets (e.g., TTL)
- security: use it to define access control
View node_exporter.sh
This file contains 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 | |
version="${VERSION:-1.0.1}" | |
arch="${ARCH:-linux-amd64}" | |
bin_dir="${BIN_DIR:-/usr/local/bin}" | |
wget "https://github.com/prometheus/node_exporter/releases/download/v$version/node_exporter-$version.$arch.tar.gz" \ | |
-O /tmp/node_exporter.tar.gz | |
mkdir -p /tmp/node_exporter |
View prometheus.yml
This file contains 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
global: | |
scrape_interval: 60s | |
external_labels: | |
monitor: 'example' | |
rule_files: | |
- /etc/prometheus/config/*.rules | |
scrape_configs: |
NewerOlder