Create a virtual env
python -m venv myenv
# To activate the environment on Windows:
./myenv/Scripts/Activate.ps1
# To activate the environment on Linux:
source myenv/bin/activate
#pragma once | |
#include <string> | |
#include <unordered_map> | |
#include <functional> | |
// Define a type for the event handler function | |
using EventHandlerFunc = std::function<void(void)>; | |
class EventHandler |
const http = require("http"); | |
const server = http.createServer((request, response) => { | |
const requestStart = Date.now(); | |
let errorMessage = null; | |
let body = []; | |
request.on("data", chunk => { | |
body.push(chunk); | |
}); |
#!/bin/sh | |
cfufw_deleted=0 | |
cfufw_created=0 | |
cfufw_ignored=0 | |
cfufw_nonew=0 | |
cfufw_purge=0 | |
cfufw_showhelp=0 | |
cf_ufw_add () { |
Post a webhook embed when someone is connecting via ssh to your server
To install
wget https://gist.githubusercontent.com/faceslog/e45fcaf85932f619fdaa8ae54b25cf38/raw/c4f3959bb7d1f30e49ef7b746c1f74bd07a97943/install.sh
chmod +x install.sh
bash install.sh [WEBHOOK URL]
#pragma once | |
#include <cmath> | |
// Welford's online algorithm: | |
// https://en.wikipedia.org/wiki/Algorithms_for_calculating_variance#On-line_algorithm | |
// It is often useful to be able to compute the variance in a single pass | |
/** | |
* EXAMPLE: |