Skip to content

Instantly share code, notes, and snippets.

View rubot's full-sized avatar

Ruben Nicolaides rubot

  • skillbyte GmbH
  • Berlin, Germany
  • 00:27 (UTC +02:00)
View GitHub Profile
@rubot
rubot / asuswrt-merlin.md
Created April 28, 2020 13:40 — forked from 1951FDG/asuswrt-merlin.md
Instructions for installing and configuring Squid caching proxy server on Asuswrt-Merlin

Setup Entware-ng-3x on Asuswrt-merlin

Entware-ng-3x is a modern alternative to Optware.

For those unfamiliar with Optware: it's a software repository that offers various software programs that can be installed on your router. They allow you to add new functionality to your router (provided you have the know-how to properly configure them).

Entware-ng-3x system library is specially modified (patched) so that standard linux files that are normally located in /etc directory are now located in /opt/etc/ directory. To simplify things let's consider /etc/passwd file. On Asuswrt-merlin it normally looks something like:

admin:x:0:0:admin:/root:/bin/sh

nas:x:100:100:nas:/dev/null:/dev/null

@rubot
rubot / README.md
Created March 27, 2020 10:39 — forked from zealot128/README.md
Gitlab Autoscaling Infrastructure on Hcloud with internal caching

Order and provision a Hetzner Cloud based Gitlab-Runner Docker-machine autoscaling infrastructure

See my blog for more information.

  • Adjust settings in vars.auto.tfvars.
  • Run with terraform init && terraform apply

Content:

@rubot
rubot / Dockerfile
Created March 22, 2020 19:06 — forked from majodev/Dockerfile
netdata daemonset on kubernetes
FROM netdata/netdata:latest
MAINTAINER YOUR_EMAIL
# add netdata user to root group (access volumne mounts from host)
RUN apk --no-cache add shadow
RUN usermod -a -G root netdata
ENTRYPOINT ["/usr/sbin/run.sh"]
@rubot
rubot / remote-user-info.yml
Created January 10, 2020 14:43 — forked from fia5000/remote-user-info.yml
Trick for getting remote user info in Ansible
---
# Ansible doesn't expose the shell environment of the remotely logged in user
# so we need to use a few tricks to get some of these values.
#
# This playbook demonstrates how to get a couple of useful environment variables.
#
# NOTE: these values are different to ansible_env.ansible_user_dir and
# ansible_env.ansible_user_shell which represent the user running ansible.
@rubot
rubot / howto-installing-vault-on-aws-linux.md
Created January 10, 2020 14:43 — forked from fia5000/howto-installing-vault-on-aws-linux.md
HOWTO: Installing Vault on AWS Linux

HOWTO: Installing Vault On AWS Linux

This is quick howto for installing vault on AWS Linux, mostly to remind myself. At the end of this tutorial, you'll have a working vault server, using s3 for the backend, self signed certificates for tls, and supervisord to ensure that the vault server is always running, and starts on reboot.

Setting up S3

First things first, let's set up an s3 bucket to use as the storage backend for our s3 instance.

  1. From the AWS Mangement Console, go to the S3 console.

  2. Click on the Create Bucket button

#!/usr/bin/env bash
export PATH="${PATH}:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin"
ME="${0}"
if [ "${BASH_VERSINFO[0]}" -lt "4" ]
then
echo >&2 "Sorry! This script needs BASH version 4+, but you have BASH version ${BASH_VERSION}"
exit 1
@rubot
rubot / ansible-reboot.yaml
Created January 10, 2020 14:42 — forked from fia5000/ansible-reboot.yaml
ansible waiting for reboot, really really works!
- name: 'check if reboot is required'
shell: if [ $(readlink -f /vmlinuz) != /boot/vmlinuz-$(uname -r) ]; then echo 'yes'; else echo 'no'; fi
ignore_errors: true
register: reboot
- name: 'reboot...'
shell: nohup bash -c 'sleep 2 && shutdown -r now "Ansible kernel update applied"' &
async: 0
poll: 0
ignore_errors: true
@rubot
rubot / generate-ssh-key.sh
Created December 13, 2018 13:51 — forked from grenade/01-generate-ed25519-ssh-key.sh
Correct file permissions for ssh keys and config.
ssh-keygen -t rsa -b 4096 -N '' -C "rthijssen@gmail.com" -f ~/.ssh/id_rsa
ssh-keygen -t rsa -b 4096 -N '' -C "rthijssen@gmail.com" -f ~/.ssh/github_rsa
ssh-keygen -t rsa -b 4096 -N '' -C "rthijssen@gmail.com" -f ~/.ssh/mozilla_rsa
@rubot
rubot / Docker_UFW_IPTABLES.md
Created October 2, 2018 11:02 — forked from menxit/Docker_UFW_IPTABLES.md
Docker UFW and iptables
  1. Disable iptables
$ sudo vim /etc/docker/daemon.json
{
  "iptables": false
}
server {
listen 443 ssl http2 proxy_protocol;
include /ssl.conf.include;
ssl_certificate /etc/nginx/certs/main.crt;
ssl_certificate_key /etc/nginx/certs/main.key;
server_name example.org;