Skip to content

Instantly share code, notes, and snippets.

View danielporto's full-sized avatar

Daniel Porto danielporto

View GitHub Profile
@danielporto
danielporto / harbor.sh
Last active November 15, 2021 05:24 — forked from kacole2/harbor.sh
Quick Start Harbor Installation Script on Ubuntu 18.04
#!/bin/bash
#Harbor on Ubuntu 18.04
#Prompt for the user to ask if the install should use the IP Address or Fully Qualified Domain Name of the Harbor Server
PS3='Would you like to install Harbor based on IP or FQDN? '
select option in IP FQDN
do
case $option in
IP)
@danielporto
danielporto / deploy_local_caliper.sh
Created August 13, 2020 16:38
Running caliper benchmark
#preparations:
#install asdf (https://asdf-vm.com/)
git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.7.8
#enable asdf:
echo ". $HOME/.asdf/asdf.sh" >> ~/.profile
#install nodejs plugin for asdf:
asdf plugin list all
asdf plugin add nodejs
@danielporto
danielporto / gist:c5d66068a77d6fd928a9d35faf584128
Last active June 3, 2020 12:59
Python plumbum examples for most common tasks
# basics, importing bash commands
from plumbum import local, FG, BG, TF, RETCODE
from plumbum.cmd import sudo, true, rm, ln, echo, tee, cp, mv, ls, find, grep, curl, zsh, cat
# defining a command
ls = ls['-l','/tmp']
# calling the command
ls()
# defining and calling a command
@danielporto
danielporto / wireguard-centos-8.sh
Created March 11, 2020 22:05 — forked from zhiyuan-lin/wireguard-centos-8.sh
WireGuard VPN Server on CentOS 8
# /etc/sysctl.conf
net.core.default_qdisc = fq
net.ipv4.tcp_congestion_control = bbr
net.ipv4.conf.default.rp_filter = 1
net.ipv4.conf.all.rp_filter = 1
net.ipv4.ip_forward = 1
net.ipv4.tcp_syncookies = 1

1. Clone your fork:

git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
resource "google_compute_firewall" "frontend_rules" {
name = "default"
network = "default"
allow {
protocol = "icmp"
}
allow {
protocol = "tcp"