This is a very simple HTTP server for Unix, using fork(). It's very easy to use
- include header
httpd.h
- write your route method, handling requests.
- call
serve_forever("12913")
to start serving on port 12913
var landGrid = [ | |
{ | |
"X": "1", | |
"Y": "1" | |
}, | |
{ | |
"X": "1", | |
"Y": "2" | |
}, | |
{ |
import os | |
import sys | |
import time | |
import subprocess | |
import traceback | |
from pymem import Pymem, process, exception | |
############################################################################################# | |
# This is an in-memory patch that launches and patches Voicemeeter Potato in memory on startup. |
// Based on following links: | |
// http://andrew.hedges.name/experiments/haversine/ | |
// http://www.movable-type.co.uk/scripts/latlong.html | |
df | |
.withColumn("a", pow(sin(toRadians($"destination_latitude" - $"origin_latitude") / 2), 2) + cos(toRadians($"origin_latitude")) * cos(toRadians($"destination_latitude")) * pow(sin(toRadians($"destination_longitude" - $"origin_longitude") / 2), 2)) | |
.withColumn("distance", atan2(sqrt($"a"), sqrt(-$"a" + 1)) * 2 * 6371) | |
>>> | |
+--------------+-------------------+-------------+----------------+---------------+----------------+--------------------+---------------------+--------------------+------------------+ | |
|origin_airport|destination_airport| origin_city|destination_city|origin_latitude|origin_longitude|destination_latitude|destination_longitude| a| distance| |
#!/usr/bin/env bash | |
# Abort sign off on any error | |
set -e | |
# Start the benchmark timer | |
SECONDS=0 | |
# Repository introspection | |
OWNER=$(gh repo view --json owner --jq .owner.login) |
// Função sem parâmetros | |
void escreverBemVindo(){ | |
print("Seja bem-vindo!"); | |
} | |
// Quando a função só tem um comando interno | |
// Substitui abertura e fechamento de bloco, e o comando return | |
void escreverTipoFuncao() => print("Função com um comando."); | |
// Função com passagem de parâmetros (podem ter quantos parâmetros quiser) |
This article proved to be a decent starting point, but I was particularly interested in allowing password-based logins to OpenVPN using a username/password backed by FreeIPA (opposed to client certificates) as the identity provider.
ipa-client-install --mkhomedir
kinit
ipa service-add openvpn/`hostname`
SELECT 'ALTER TABLE ' + QUOTENAME(ss.name) + '.' + QUOTENAME(st.name) + ' ADD created_date DATETIME NULL;' | |
FROM sys.tables st | |
INNER JOIN sys.schemas ss on st.[schema_id] = ss.[schema_id] | |
WHERE st.is_ms_shipped = 0 | |
AND NOT EXISTS ( | |
SELECT 1 | |
FROM sys.columns sc | |
WHERE sc.[object_id] = st.[object_id] | |
AND sc.name = 'created_date' | |
) |
How to make an application icon for macOS using
iconset
&iconutil