Skip to content

Instantly share code, notes, and snippets.

@publicarray
publicarray / prometheus.md
Last active August 11, 2018 00:46
Docker & Prometheus node-exporter

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 / ovh.md
Created March 2, 2019 21:54
ovh terraform

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 / 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

Keybase proof

I hereby claim:

  • I am publicarray on github.
  • I am publicarray (https://keybase.io/publicarray) on keybase.
  • I have a public key whose fingerprint is AC7B 7A03 D00D 8236 B8E6 F9D1 80B9 6879 01B6 587C

To claim this, I am signing this object:

@publicarray
publicarray / wine-wrapper-or-engine.md
Last active December 25, 2019 02:29
Compile a wineskin base on macOS 10.11 and newer

Option 1 - Compiling

Get the source

git clone git://source.winehq.org/git/wine.git

Or from the Github mirror

@publicarray
publicarray / Nginx.md
Last active September 29, 2020 21:12
Nginx with modules and latest OpenSSL [CentOS]

Nginx/OpenSSL on CentOS

@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'
@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
@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
File moved to a new reposetory https://github.com/publicarray/spkcli/blob/main/spkcli.sh