Skip to content

Instantly share code, notes, and snippets.

@enes-oerdek
enes-oerdek / Prometheus.php
Created August 29, 2023 11:04
This is a minimal and simple PHP class for collecting prometheus application metrics and storing them in APC used on Proxer.Me
<?php
class Prometheus
{
private static $prefixCounter = 'php_app_counter_';
private static $prefixGauge = 'php_app_gauge_';
public static function incrementCounter($name)
{
self::increment(self::$prefixCounter, $name);
}
#include <GSMSim.h>
#define RX 7
#define TX 8
#define RESET 2
#define BAUD 9600
GSMSim gsm;
// Demo found on https://enesordek.com/?p=2515
$fn=200;
width_inner_diff = 23.5;
width_innerhollow_delta = 27-width_inner_diff;
height_innerhollow = 16;
translate([-50,0,0])
@enes-oerdek
enes-oerdek / limt_req_zone_whitelist
Created March 20, 2018 10:34 — forked from tianying484/limt_req_zone_whitelist
A way to whitelist certain IP ranges from limit_req_zone in nginx
geo $limited {
default 1;
# Wordpress Jetpack ranges:
192.0.0.0/16 0;
66.135.0.0/16 0;
66.155.0.0/16 0;
76.74.0.0/16 0;
}