Skip to content

Instantly share code, notes, and snippets.

Avatar
🐌

David Rio Deiros drio

🐌
View GitHub Profile
@ruanbekker
ruanbekker / flask_prometheus.md
Created Jan 11, 2021
Python Flask with Prometheus Basic Example
View flask_prometheus.md
$ 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
@justinschuldt
justinschuldt / raspberry-pi-zero_as_webcam.md
Last active Aug 6, 2022
Directions for setting up a RaspberryPi to act as a generic USB webcam
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
@pjobson
pjobson / openwrt-on-x86_64.md
Last active May 28, 2022
OpenWRT on x86_64
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
@luk3thomas
luk3thomas / Gemfile
Created Feb 22, 2018
Proxy to staging
View Gemfile
source "https://rubygems.org"
gem "rack"
gem "rack-proxy"
@steven2358
steven2358 / ffmpeg.md
Last active Aug 8, 2022
FFmpeg cheat sheet
View ffmpeg.md
@jon-a-nygaard
jon-a-nygaard / README-Highcharts-Webpack-Babel.md
Last active Oct 30, 2020
A Highcharts example in use with Webpack and Babel.
View README-Highcharts-Webpack-Babel.md

A Highcharts example in use with Webpack and Babel.

Install

  1. Download source files
  2. Run npm install to install all dependencies.
  3. Run npm run build to bundle app.js into bundle.js

Open application

  1. Open index.html in a browser.
@DominicBreuker
DominicBreuker / iptables.md
Last active Oct 14, 2021
iptables firewall
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
@galexrt
galexrt / node_exporter.sh
Last active Jul 5, 2022
Simple Prometheus node_exporter install script (Updated for 1.0.1)
View node_exporter.sh
#!/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
global:
scrape_interval: 60s
external_labels:
monitor: 'example'
rule_files:
- /etc/prometheus/config/*.rules
scrape_configs: