Skip to content

Instantly share code, notes, and snippets.

Avatar
💉
💉

Sebastian Schmidt publicarray

💉
💉
View GitHub Profile
@publicarray
publicarray / .editorconfig
Last active Oct 9, 2021
Wordpress phpcs and php-cs-fixer
View .editorconfig
root = true
[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
indent_style = tab
[*.yml]
@publicarray
publicarray / ffmpeg.md
Last active Aug 29, 2021
Various FFmpeg differences
View ffmpeg.md

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 / battery-charge-threshold.service
Created Apr 26, 2021
Limit battery charge - /etc/systemd/system/battery-charge-threshold.service
View battery-charge-threshold.service
[Unit]
Description=Set the battery charge threshold
After=multi-user.target
StartLimitBurst=0
[Service]
Type=oneshot
Restart=on-failure
ExecStart=/bin/bash -c 'echo 70 > /sys/class/power_supply/BAT0/charge_control_end_threshold'
View spkcli.sh
File moved to a new reposetory https://github.com/publicarray/spkcli/blob/main/spkcli.sh
@publicarray
publicarray / alpine-install.sh
Last active Mar 9, 2019 — forked from thde/alpine-install.sh
A script to install alpine linux on a dedicated server. Tested on Hetzner, Kimsufi / OVH
View alpine-install.sh
#!/bin/sh
set -ex
PATH=/bin:/sbin:/usr/bin:/usr/sbin
KEYMAP="us us"
HOST=alpine
USER=anon
ROOT_FS=ext4
BOOT_FS=ext4
View ovh.md

Terraform on OHV

  1. Create a project
  2. Cloud->Servers->Project Name->Tecnical Management->Openstack Users
  3. Add user
  4. Download an Openstack Configuration File (v3)

Follow https://docs.ovh.com/gb/en/public-cloud/how-to-use-terraform/

But use the following provider, fill in the blanks from the configuration file you downloaded earlier:

@publicarray
publicarray / prometheus.md
Last active Aug 11, 2018
Docker & Prometheus node-exporter
View prometheus.md

https://www.digitalocean.com/community/tutorials/how-to-install-prometheus-on-ubuntu-16-04

https://www.digitalocean.com/community/tutorials/how-to-use-prometheus-to-monitor-your-centos-7-server

https://www.digitalocean.com/community/tutorials/how-to-use-prometheus-to-monitor-your-ubuntu-14-04-server

docker run --rm quay.io/prometheus/node-exporter -h

docker run -d --net=host --pid=host --name "node-exporter" --cap-add=SYS_TIME -v "/proc:/host/proc:ro" -v "/sys:/host/sys:ro" -v "/:/rootfs:ro" quay.io/prometheus/node-exporter --path.procfs /host/proc --path.sysfs  /host/proc --collector.filesystem.ignored-mount-points "^/(sys|proc|dev|host|etc)($|/)"
@publicarray
publicarray / AU-banking&CDNs.md
Last active Jul 8, 2018
Australian Internet banking and CDNs
View AU-banking&CDNs.md

Australian Internet banking and CDNs

Note: I do not care if their home page is on a CDN what matters is that the banking credentials and financial information is end to end encrypted from the financial institution and to your browser. There are no grantees that this is the case even with TLS. TLS might be terminated earlier e.g by a load-balancer or a CDN. I only checked the login pages since I don't have an account in all of the banks, that would be crazy. I tried to use Whois data and HTML headers to determine CDNs. This method is not foolproof so please take it with a grain of salt

Hostname CDN / Cloud Firewall Uses 3rd party assets without Subresource Integrity SSL Labs score comments
internetbanking.suncorpbank.com.au Incapsula Yes A IP is owned by Incapsula
banking3.anz.com B IP address owned by ANZ but has relation to "SingTel Optus Pty Ltd". Uses lots of type="hidden" fields on login form,
banking.wes
View worker.js
// 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 / make-doc
Created Jan 6, 2018
Make a FreeBSD Handbook docset for Dash
View make-doc
#!/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