Skip to content

Instantly share code, notes, and snippets.

View iamjenechka's full-sized avatar
wow!

Jenechka iamjenechka

wow!
View GitHub Profile
@gitrgoliveira
gitrgoliveira / gcp_demo.sh
Created November 8, 2019 12:53
setting up Vault and GCP auth and secrets backend
#! /bin/bash
#
# based on https://medium.com/google-cloud/vault-auth-and-secrets-on-gcp-51bd7bbaceb
#
################################################################
# setup GCP
################################################################
PROJECT_ID=`gcloud config get-value core/project`
@nealfennimore
nealfennimore / wireguard.conf
Last active September 25, 2024 19:58
Wireguard VPN - Forward all traffic to server
# ------------------------------------------------
# Config files are located in /etc/wireguard/wg0
# ------------------------------------------------
# ---------- Server Config ----------
[Interface]
Address = 10.10.0.1/24 # IPV4 CIDR
Address = fd86:ea04:1111::1/64 # IPV6 CIDR
PostUp = iptables -A FORWARD -i wg0 -j ACCEPT; iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE; ip6tables -A FORWARD -i wg0 -j ACCEPT; ip6tables -t nat -A POSTROUTING -o eth0 -j MASQUERADE # Add forwarding when VPN is started
PostDown = iptables -D FORWARD -i wg0 -j ACCEPT; iptables -t nat -D POSTROUTING -o eth0 -j MASQUERADE; ip6tables -D FORWARD -i wg0 -j ACCEPT; ip6tables -t nat -D POSTROUTING -o eth0 -j MASQUERADE # Remove forwarding when VPN is shutdown
@rmoriz
rmoriz / desc.md
Last active October 25, 2023 12:21
WireGuard Key Generation (wg genkey)

wg genkey / pubkey

wg genkey
qJvFeHHuffBaPWx4veJGQqXw6j5zdo5cSOaBd1Z0Km4=


echo 'qJvFeHHuffBaPWx4veJGQqXw6j5zdo5cSOaBd1Z0Km4=' | wg pubkey
knL56pMLtyQVyZXOd9m2vEeOopPtbv4tMSU0ctBvGQo=
@kuanghan
kuanghan / docker_lxc.md
Created January 3, 2019 18:41
Setting up docker to run in a PRIVILEGED LXC container

Setting up docker to run in a PRIVILEGED LXC container

Set up a privileged container

Create container

Let's call the container docker_test1.

$ sudo lxc-create -t download -n docker_test1
...
Follow the prompts on the screen to set up the new container.
@bilsalak
bilsalak / exercise-maps.go
Created December 2, 2018 01:09
A Tour of Go - Exercise: Maps
// Implement WordCount. It should return a map of the counts of each “word” in the string s.
// The wc.Test function runs a test suite against the provided function and prints success or failure.
//
// You might find strings.Fields helpful.
package main
import (
"strings"
"golang.org/x/tour/wc"
@dideler
dideler / bot.rb
Last active November 9, 2024 11:37
Sending a notification message to Telegram using its HTTP API via cURL
# Use this script to test that your Telegram bot works.
#
# Install the dependency
#
# $ gem install telegram_bot
#
# Run the bot
#
# $ ruby bot.rb
#
@jnaulty
jnaulty / virt-install-centos
Created March 18, 2018 00:36 — forked from giovtorres/virt-install-centos
Install CentOS cloud images on KVM using cloud-init
#!/bin/bash
## **Updates to this file are now at https://github.com/giovtorres/kvm-install-vm.**
## **This updated version has more options and less hardcoded variables.**
# Take one argument from the commandline: VM name
if ! [ $# -eq 1 ]; then
echo "Usage: $0 <node-name>"
exit 1
fi
# Registering your new number
signal-cli -u "+1234568790" register
signal-cli -u "+1234568790" verify xxxxxx