Skip to content

Instantly share code, notes, and snippets.

@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 / 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 / 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 / .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]
@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 / battery-charge-threshold.service
Created April 26, 2021 21:29
Limit battery charge - /etc/systemd/system/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'
File moved to a new reposetory https://github.com/publicarray/spkcli/blob/main/spkcli.sh
@publicarray
publicarray / alpine-install.sh
Last active March 9, 2019 07:44 — forked from thde/alpine-install.sh
A script to install alpine linux on a dedicated server. Tested on Hetzner, Kimsufi / OVH
#!/bin/sh
set -ex
PATH=/bin:/sbin:/usr/bin:/usr/sbin
KEYMAP="us us"
HOST=alpine
USER=anon
ROOT_FS=ext4
BOOT_FS=ext4