Skip to content

Instantly share code, notes, and snippets.

@i-like-robots
i-like-robots / instrumentRequests.js
Last active June 6, 2023 13:18
Instrument Node.js HTTP requests
// Based on <https://blog.bearer.sh/http-api-instrumentation-nodejs/>
const http = require('http')
const https = require('https')
const { URL } = require('url')
const Metrics = require('metrics')
const { performance } = require('perf_hooks')
const metrics = {}
const metricTypes = {
@Integralist
Integralist / README.md
Last active September 4, 2018 13:28
How encryption with certificates and public/private keys work

PKI

  • PKI is based upon two keys (public and private)
  • Data can be securely encrypted using either the public or private keys
  • Data can only be decrypted when using the opposite key to that which encrypted the data
  • Use a Key Generator (e.g. ssh-keygen) to create your public/private keys
  • These keys are typically stored in ~/.ssh/
    • id_rsa (private key; do not share! typically used to decrypt data)
    • id_rsa.pub (public key; typically used to encrypt data)
@ck-on
ck-on / ocp.php
Last active March 25, 2024 09:30
OCP - Opcache Control Panel (aka Zend Optimizer+ Control Panel for PHP)#ocp #php #opcache #opcode #cache #zend #optimizerplus #optimizer+
<?php
/*
OCP - Opcache Control Panel (aka Zend Optimizer+ Control Panel for PHP)
Author: _ck_ (with contributions by GK, stasilok)
Version: 0.1.7
Free for any kind of use or modification, I am not responsible for anything, please share your improvements
* revision history
0.1.7 2015-09-01 regex fix for PHP7 phpinfo
0.1.6 2013-04-12 moved meta to footer so graphs can be higher and reduce clutter