This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /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` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ------------------------------------------------ | |
# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Use this script to test that your Telegram bot works. | |
# | |
# Install the dependency | |
# | |
# $ gem install telegram_bot | |
# | |
# Run the bot | |
# | |
# $ ruby bot.rb | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Registering your new number | |
signal-cli -u "+1234568790" register | |
signal-cli -u "+1234568790" verify xxxxxx |
NewerOlder