Skip to content

Instantly share code, notes, and snippets.

View xirixiz's full-sized avatar

Bram van Dartel xirixiz

View GitHub Profile
@xirixiz
xirixiz / set_up_docker.ps1
Created November 30, 2021 07:55 — forked from pavlovpetro/set_up_docker.ps1
This script setting up a Docker for Windows - adds your Local Registry and Proxy, changes ProgramDir and the location of the MobyLinuxVM
#### Set up Docker Daemon
#### Check if this script is ran with admin rights
# if no - exit with message
function Test-Elevation {
$role = [Security.Principal.WindowsBuiltInRole]::Administrator
$principal = [Security.Principal.WindowsPrincipal]`
[Security.Principal.WindowsIdentity]::GetCurrent()
$principal.IsInRole($role)
}
@xirixiz
xirixiz / Makefile.ask_passwd
Created November 24, 2021 12:34 — forked from hyamamoto/Makefile.ask_passwd
asking a password in a makefile.
ask_password:
@$(eval PASSWORD=$(shell stty -echo; read -p "Password: " pwd; stty echo; echo $$pwd))
echo $(PASSWORD)
ask_password_twice:
while true; do \
read -s -p "Password: " password; \
echo; \
read -s -p "Password (again): " password2; \
@xirixiz
xirixiz / .makefile
Created November 24, 2021 12:19 — forked from hakuno/.makefile
Run Ansible Playbook in .makefile
# I found at https://dreisbach.us/articles/simple-ansible-makefile/
# Replace this
# ansible-playbook -i hosts --vault-password-file=.vault-password.txt site.yml
# For this
tags = $(subst roles/,,$(wildcard roles/*))
.PHONY: all $(tags)
all:
ansible-playbook -i hosts --vault-password-file=.vault-password.txt site.yml
$(tags):
@xirixiz
xirixiz / zone_instructions
Created April 12, 2021 05:44 — forked from wassupdoc/zone_instructions
Zone settings for edgerouter
#based on http://www.forshee.me/2016/03/02/ubiquiti-edgerouter-lite-setup-part-2-firewall-setup.html
configure
edit firewall name allow-est-drop-inv
set default-action drop
set enable-default-log
set rule 1 action accept
set rule 1 state established enable
set rule 1 state related enable
set rule 2 action drop
# export private keys
gpg --export-secret-keys --armor > gpg-private.keys
# import private keys
gpg --import gpg-private.keys
# export public keys
gpg --export --armor > gpg-public.keys
# import public keys
@xirixiz
xirixiz / index.md
Created March 11, 2021 11:03 — forked from hrdtbs/index.md
Connect to Github with ED25519

Connect to github with ED25519

2017/08/09 MacOS

Check SSH key

$ ls -al ~/.ssh
@xirixiz
xirixiz / ventilation.yaml
Created February 21, 2021 15:11 — forked from SqyD/ventilation.yaml
ESPHome PWM fan using a Wemos D1 mini lite
# Controlling my Buva Qstream ventilation system using:
# * A Wemos D1 mini lite (an ESP8266 based board)
# * A Wemos power shield so I can power the Wemos from the ventilation units 12V supply.
# * A simple PWM to 10V convertor like this: https://www.cheaptech.nl/pwm-signaal-te-voltage-converter-1-3-khz-0-10-v-pw.html
# * The amazing ESPHome firmware tool: https://esphome.io
# * Home Assistant to tie it all together: https://www.home-assistant.io
#
# I used to use a Raspberry Pi and some Python code for this. See https://gist.github.com/SqyD/a927ab612df767a0cc892bcde23d025c
# The Wemos approach seems more stable and doesn't require external USB power.
@xirixiz
xirixiz / UGW3_Wireguard.md
Last active February 25, 2024 22:12 — forked from pamolloy/README.md
Ubiquiti USG configuration for Wireguard

The purpouse is to have a WireGuard server running with a configuration for 2 clients to connect to the WireGuard server.

Installation - First steps

Follow the instructions for downloading and installing the WireGuard package here: https://github.com/WireGuard/wireguard-vyatta-ubnt

curl -OL https://github.com/WireGuard/wireguard-vyatta-ubnt/releases/download/${RELEASE}/${BOARD}-${RELEASE}.deb
sudo dpkg -i ${BOARD}-${RELEASE}.deb
@xirixiz
xirixiz / gist:0964bd49bd5fa3e478744f81465fca5a
Created October 4, 2019 12:46 — forked from tonyklawrence/gist:b477dcf624577ab154ed3b51cea60e27
Docker containers using VLAN network on Synology DSM 6.X
First we need to create the VLAN on the Synology from the command line:
See: https://nielshagoort.com/2016/03/30/synology-vlan-tagging/
Then add Network to Docker using maclvan driver
See: https://docs.docker.com/engine/userguide/networking/get-started-macvlan/#macvlan-8021q-trunk-bridge-mode-example-usage
Details...
@xirixiz
xirixiz / Set up GitHub push with SSH keys.md
Last active May 18, 2024 17:58 — forked from developius/README.md
Set up GitHub push with SSH keys

SSH keypair setup for GitHub (or GitHub/GitLab/BitBucket, etc, etc)

Create a repo.

Make sure there is at least one file in it (even just the README.md)

Generate a SSH key pair (private/public):

ssh-keygen -t rsa -C "your_email@example.com"