Skip to content

Instantly share code, notes, and snippets.

@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 / 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 / AU-banking&CDNs.md
Last active July 8, 2018 22:00
Australian Internet banking and CDNs

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
// 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 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 / minecraft.md
Last active January 5, 2018 05:49
Minecraft with SocketBuffer - on Vultr (CentOS 6.9)
wget https://ci.destroystokyo.com/job/PaperSpigot/lastSuccessfulBuild/artifact/paperclip-1294.jar
ln -sf paperclip-1294.jar minecraft_server.jar
service minecraft restart

service iptables stop
chkconfig iptables off
# systemctl disable iptables

yum install tuned tuned-utils
@publicarray
publicarray / getfish.sh
Last active January 2, 2018 23:44
Install fishshell on OpenBSD
#!/bin/sh
pkg_add curl gcc g++ gmake
curl -Lo /tmp/fish.tar.gz https://github.com/fish-shell/fish-shell/releases/download/2.7.1/fish-2.7.1.tar.gz
tar -xzvf /tmp/fish.tar.gz -C /tmp/
cd /tmp/fish-*
CC=egcc CXX=eg++ ./configure
gmake install
echo '/usr/local/bin/fish' | sudo tee -a /etc/shells > /dev/null
@publicarray
publicarray / install.sh
Last active January 3, 2018 22:47
Install my development environment on a fresh mac
#!/usr/bin/env bash
#
# Execute the file:
# bash <(curl -fsSL https://seby.io/myfish)
#
set -e
set -v
echo "If you don't know what this script does, hit CTRL-C NOW!"
read -p "Do you want to continue? [Y/y] " -n 1 -r
@publicarray
publicarray / sysctl.conf
Created August 8, 2017 09:58 — forked from kgriffs/sysctl.conf
Linux Web Server Kernel Tuning
# Configuration file for runtime kernel parameters.
# See sysctl.conf(5) for more information.
# See also http://www.nateware.com/linux-network-tuning-for-2013.html for
# an explanation about some of these parameters, and instructions for
# a few other tweaks outside this file.
# Protection from SYN flood attack.
net.ipv4.tcp_syncookies = 1
@publicarray
publicarray / dnsdist.md
Last active August 5, 2017 08:34
Compile dnsdist on FreeBSD
pkg install git ragel libsodium re2 py27-virtualenv
git clone https://github.com/PowerDNS/pdns.git
cd pdns/pdns/dnsdistdist
virtualenv build
autoreconf -i
./configure --bindir=/usr/local/sbin --enable-dnscrypt --enable-libsodium --enable-re2
gmake