Skip to content

Instantly share code, notes, and snippets.

View pedroamador's full-sized avatar
💭
Happy

Pedro Amador Rodríguez pedroamador

💭
Happy
View GitHub Profile
@pedroamador
pedroamador / configure-mtu.sh
Created May 27, 2022 12:00 — forked from Renan-Di/configure-mtu.sh
Configure mtu inside wsl to avoid conectivity problems when using vpn
#! /bin/bash
mkdir ~/start-scripts
cat <<EOF >> ~/start-scripts/change-mtu.sh
#! /bin/bash
ip link set dev eth0 mtu 1350
EOF
chmod +x ~/start-scripts/change-mtu.sh
echo "sudo ~/start-scripts/change-mtu.sh" >> ~/.bashrc
sudo -i
echo "$USER ALL=NOPASSWD: $HOME/start-scripts/change-mtu.sh" | EDITOR='tee -a' sudo -n -e /etc/sudoers.d/mtu
#####################################################
# Running AWS Services In A Laptop Using LocalStack #
# https://youtu.be/8hi9P1ffaQk #
#####################################################
# Referenced videos:
# - Terraform vs. Pulumi vs. Crossplane - Infrastructure as Code (IaC) Tools Comparison: https://youtu.be/RaoKcJGchKM
# - Should We Replace Docker Desktop With Rancher Desktop?: https://youtu.be/bYVfCp9dRTE
#########
@pedroamador
pedroamador / mount_qcow2.md
Created November 26, 2021 17:21 — forked from shamil/mount_qcow2.md
How to mount a qcow2 disk image

How to mount a qcow2 disk image

This is a quick guide to mounting a qcow2 disk images on your host server. This is useful to reset passwords, edit files, or recover something without the virtual machine running.

Step 1 - Enable NBD on the Host

modprobe nbd max_part=8
@pedroamador
pedroamador / k3s-multipass.sh
Created May 7, 2020 07:08 — forked from lucj/k3s-multipass.sh
Setup a k3s kubernetes cluster using Multipass VMs
for node in node1 node2 node3;do
multipass launch -n $node
done
# Init cluster on node1
multipass exec node1 -- bash -c "curl -sfL https://get.k3s.io | sh -"
# Get node1's IP
IP=$(multipass info node1 | grep IPv4 | awk '{print $2}')
@pedroamador
pedroamador / CONTRIBUTING.md
Created April 12, 2020 19:43 — forked from briandk/CONTRIBUTING.md
A basic template for contributing guidelines that I adapted from Facebook's open source guidelines

Contributing to Transcriptase

We love your input! We want to make contributing to this project as easy and transparent as possible, whether it's:

  • Reporting a bug
  • Discussing the current state of the code
  • Submitting a fix
  • Proposing new features
  • Becoming a maintainer

We Develop with Github

@pedroamador
pedroamador / README.md
Created April 5, 2020 15:16 — forked from zoilomora/README.md
How to disable systemd-resolved in Ubuntu

How to disable systemd-resolved in Ubuntu

Stages

  • Disable and stop the systemd-resolved service:

      sudo systemctl disable systemd-resolved.service
      sudo systemctl stop systemd-resolved
    
  • Then put the following line in the [main] section of your /etc/NetworkManager/NetworkManager.conf:

@pedroamador
pedroamador / del_cluster.sh
Created November 20, 2019 07:08 — forked from ianchen06/del_cluster.sh
delete proxmox cluster
# source: https://forum.proxmox.com/threads/removing-deleting-a-created-cluster.18887/
#/bin/sh
# stop service
systemctl stop pvestatd.service
systemctl stop pvedaemon.service
systemctl stop pve-cluster.service
systemctl stop corosync
systemctl stop pve-cluster
# edit through sqlite, check, delete, verify
@pedroamador
pedroamador / proxmox_lxc_nfs_server.md
Created October 13, 2019 18:03 — forked from rwenz3l/proxmox_lxc_nfs_server.md
Install a NFS Server inside a LXC Container on Proxmox 5.1

Installing NFS inside LXC Container on Proxmox 5.1

Host Setup:

Create LXC Container as usual, but do not start it yet.

# Install NFS-Kernel on Host
apt install nfs-kernel-server
@pedroamador
pedroamador / upload.php
Created April 24, 2019 04:44 — forked from taterbase/upload.php
Simple file upload in php
<!DOCTYPE html>
<html>
<head>
<title>Upload your files</title>
</head>
<body>
<form enctype="multipart/form-data" action="upload.php" method="POST">
<p>Upload your file</p>
<input type="file" name="uploaded_file"></input><br />
<input type="submit" value="Upload"></input>
@pedroamador
pedroamador / wait_for_http_200.sh
Created November 21, 2018 15:46 — forked from rgl/wait_for_http_200.sh
Wait for an HTTP endpoint to return 200 OK with Bash and curl
bash -c 'while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' localhost:9000)" != "200" ]]; do sleep 5; done'
# also check https://gist.github.com/rgl/c2ba64b7e2a5a04d1eb65983995dce76