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 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"
@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 / pihole-macvlan-synology-docker.txt
Last active April 13, 2024 17:10
Add a PiHole instance on a macvlan enabled Docker network (Synology eth0 example)
#!/bin/bash
# NAS IP: 192.168.1.10 in this example
# DHCP scope reservation for macvlan: 192.168.1.210/28 (Details below)
## Network: 192.168.1.210/28
## HostMin: 192.168.1.211
## HostMax: 192.168.1.224
## Hosts/Net: 14
# Create a Synology macvlan0 bridge network attached to the physical eth0, and add the ip range scope (sudo)
@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
#!/bin/bash
function __set_proxy_envs() {
NO_PROXY_ENV="no_proxy NO_PROXY"
PROXY_ENV="http_proxy https_proxy all_proxy HTTP_PROXY HTTPS_PROXY ALL_PROXY"
}
function __unset_proxy_envs() {
unset NO_PROXY_ENV PROXY_ENV
}
@xirixiz
xirixiz / espeasy
Last active January 9, 2022 22:07
ESP Home - Mertik Maxcontrol - HASS - Home Assistant - Bellfires
ESPeasy rules
//GIO14 == Relay 1 = blauw
//GPIO12 == Relay 2 = geel
//GPIO13 == Relay 3 = oranje
on IGNITION do
// Close relays contacts
gpio,14,1
gpio,13,1
timerSet 1,1 // 1 second delay
#!/bin/python2s
# Symbolic name, meaning all available interfaces
VAR_HOST = ""
# Arbitrary non-privileged port
VAR_PORT = 9003
import socket
import sys
@xirixiz
xirixiz / bashrc
Last active December 15, 2021 15:25
tmux.conf based on Byobu (keyboard shortcuts as well). tmux >2.9 required!
# Put in ~/.bashrc | then source ~/.bashrc
if [[ -z "${TMUX}" ]] && [[ "${UID}" != 0 ]]; then
tmux new-session -A -s 0
fi
@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; \