Skip to content

Instantly share code, notes, and snippets.

// https://developers.cloudflare.com/workers/about/
// https://tutorial.cloudflareworkers.com
//
// A Service Worker which adds Security Headers.
// Checks:
// https://securityheaders.io/
// https://observatory.mozilla.org/
// https://csp-evaluator.withgoogle.com/
// https://hstspreload.org/
// https://www.ssllabs.com/ssltest/
@publicarray
publicarray / ACME-DNS.md
Last active June 18, 2023 08:41
acme-dns

Setup acme-dns on AWS

build (slow)

sudo dnf install go htop
git clone https://github.com/joohoi/acme-dns
cd acme-dns
mkdir ~/go
export GOPATH=~/go
go build
@publicarray
publicarray / centos8-9.sh
Last active April 21, 2023 01:04 — forked from yodermk/centos8-9.sh
Commands to live-upgrade CentOS Streams 8 -> 9
# The general procedure here is adapted from the 7->8 guide here. https://www.tecmint.com/upgrade-centos-7-to-centos-8/
#
# It is a curated list of my bash history. I entered other commands so hopefully I got the right ones here.
yum upgrade
reboot
dnf install epel-release
dnf install rpmconf
dnf install yum-utils
rpmconf -a # answer "n" to both things
@publicarray
publicarray / learnps.ps1
Last active January 6, 2023 06:20
Powersell snipits
# Dowload help files (run as Admin)
Update-Help -UICulture en-US
# Search for commands (cmdlets)
Get-command *process*
# man pages
Get-Help Get-Timezone
# Get object types
Get-Date | Get-Member
Get-Random | Get-Member # TypeName: System.Int32
# List all properties of an object
@publicarray
publicarray / .editorconfig
Last active October 9, 2021 00:14
Wordpress phpcs and php-cs-fixer
root = true
[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
indent_style = tab
[*.yml]
File moved to a new reposetory https://github.com/publicarray/spkcli/blob/main/spkcli.sh
@publicarray
publicarray / ffmpeg.md
Last active August 29, 2021 12:57
Various FFmpeg differences

Various FFmpeg compile options.

SynoCommunity

root@DSM7 /# /var/packages/ffmpeg/target/bin/ffmpeg -i
ffmpeg version 4.3.1 Copyright (c) 2000-2020 the FFmpeg developers
  built with gcc 7.3.0 (crosstool-NG crosstool-ng-1.23.0-306-g04d910b)
  configuration: --target-os=linux --cross-prefix=/spksrc/toolchain/syno-x64-7.0/work/x86_64-pc-linux-gnu/bin/x86_64-pc-linux-gnu- --prefix=/var/packages/ffmpeg/target --extra-cflags=-I/spksrc/spk/ffmpeg/work-x64-7.0/install/var/packages/ffmpeg/target/include --extra-ldflags=-L/spksrc/spk/ffmpeg/work-x64-7.0/install/var/packages/ffmpeg/target/lib --extra-libs='-lxml2 -ldl' --pkg-config=/usr/bin/pkg-config --ranlib=/spksrc/toolchain/syno-x64-7.0/work/x86_64-pc-linux-gnu/bin/x86_64-pc-linux-gnu-ranlib --enable-cross-compile --enable-rpath --enable-pic --enable-shared --enable-gpl --enable-version3 --enable-fontconfig --enable-libbluray --enable-avresample --enable-libfreetype --enable-libfribidi --enable-libmp3lame --enable-libopus --enable-libsoxr --enable-libtheor
@publicarray
publicarray / make-doc
Created January 6, 2018 15:33
Make a FreeBSD Handbook docset for Dash
#!/bin/bash
set -e
if ! command -v dashing >/dev/null 2>&1; then
if command -v go >/dev/null; then
go get -u github.com/technosophos/dashing
else
echo "Missing go. Install golang first 'brew install golang'"
return 1