Credit to @jkishner for https://gist.github.com/jkishner/2fccb24640a27c2d7ac9
Also interesting: https://gist.github.com/cdown/1163649
let regex; | |
/* matching a specific string */ | |
regex = /hello/; // looks for the string between the forward slashes (case-sensitive)... matches "hello", "hello123", "123hello123", "123hello"; doesn't match for "hell0", "Hello" | |
regex = /hello/i; // looks for the string between the forward slashes (case-insensitive)... matches "hello", "HelLo", "123HelLO" | |
regex = /hello/g; // looks for multiple occurrences of string between the forward slashes... | |
/* wildcards */ | |
regex = /h.llo/; // the "." matches any one character other than a new line character... matches "hello", "hallo" but not "h\nllo" | |
regex = /h.*llo/; // the "*" matches any character(s) zero or more times... matches "hello", "heeeeeello", "hllo", "hwarwareallo" |
Install WireGuard via whatever package manager you use. For me, I use apt. | |
$ sudo add-apt-repository ppa:wireguard/wireguard | |
$ sudo apt-get update | |
$ sudo apt-get install wireguard | |
MacOS | |
$ brew install wireguard-tools | |
Generate key your key pairs. The key pairs are just that, key pairs. They can be |
#!/bin/bash | |
# Set PATH | |
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin | |
# Run the certbot container to renew the certs | |
docker-compose -f /opt/docker/certbot/docker-compose.yml run --rm certbot | |
# Concatenate the resulting certificate chain and the private key and write it to HAProxy's certificate file. | |
cat /opt/docker/certbot/certbot/etc/letsencrypt/live/example.org/{fullchain,privkey}.pem > /opt/docker/haproxy/ssl/example_org.pem |
#!/usr/bin/env node | |
const | |
express = require( 'express' ), | |
app = express(), | |
passport = require( 'passport' ), | |
LocalStrategy = require( 'passport-local' ).Strategy, | |
bodyParser = require( 'body-parser' ); | |
app.use( bodyParser.urlencoded( { extended: true } ) ); |
#!/bin/bash | |
# Cloudflare as Dynamic DNS | |
# From: https://letswp.io/cloudflare-as-dynamic-dns-raspberry-pi/ | |
# Based on: https://gist.github.com/benkulbertis/fff10759c2391b6618dd/ | |
# Original non-RPi article: https://phillymesh.net/2016/02/23/setting-up-dynamic-dns-for-your-registered-domain-through-cloudflare/ | |
# Update these with real values | |
auth_email="email@example.com" | |
auth_key="global_api_key_goes_here" | |
zone_name="example.com" |
#!/bin/sh | |
sleep 5 | |
ffmpeg -re -f mjpeg -r 10 -i "http://localhost/?action=stream" -ar 44100 -ac 2 -acodec pcm_s16le -f s16le -ac 2 -i /dev/zero -acodec aac -ab 1k -strict experimental -s 640x360 -vcodec h264 -pix_fmt yuv420p -g 20 -vb 500k -preset ultrafast -crf 31 -r 10 -f flv "rtmp://a.rtmp.youtube.com/live2/xxxx-xxxx-xxxx-xxxx" 2> /home/pi/ffmpeg.log |
Credit to @jkishner for https://gist.github.com/jkishner/2fccb24640a27c2d7ac9
Also interesting: https://gist.github.com/cdown/1163649
#!/usr/bin/env bash | |
removevolumes() { | |
sudo docker volume rm $(sudo docker volume ls -qf dangling=true) | |
sudo docker volume ls -qf dangling=true | xargs -r sudo docker volume rm | |
} | |
removenetwork() { | |
sudo docker network ls | |
sudo docker network ls | grep "bridge" |
pkgin update
pkgin in syncthing
groupadd users
useradd -d /srv/syncthing -c "syncthing user" -s /usr/bin/false -g users synctg
mkdir -p /srv/syncthing
chown synctg:users /srv/syncthing
svccfg import syncthing.xml
svcadm enable syncthing
Xft.dpi: 160 | |
Xft.autohint: 0 | |
Xft.lcdfilter: lcddefault | |
Xft.hintstyle: hintfull | |
Xft.hinting: 1 | |
Xft.antialias: 1 | |
Xft.rgba: rgb |