Skip to content

Instantly share code, notes, and snippets.

View mbprtpnix's full-sized avatar

mbprtpnix

View GitHub Profile
@mbprtpnix
mbprtpnix / keybase.md
Created March 11, 2021 17:28
keybase

Keybase proof

I hereby claim:

  • I am mbprtpnix on github.
  • I am mbprtpnix (https://keybase.io/mbprtpnix) on keybase.
  • I have a public key ASCgCJomltJJKI9ruKGj23rBizV5xDi2JB5i91m8la0nfAo

To claim this, I am signing this object:

@mbprtpnix
mbprtpnix / conda_environment_rename.sh
Created February 28, 2021 16:29 — forked from Mukei/conda_environment_rename.sh
How to rename a conda environment (workaround)
#One workaround is to create clone environment, and then remove original one:
#(remember about deactivating current environment with deactivate on Windows and source deactivate on macOS/Linux)
conda create --name new_name --clone old_name --offline #use --offline flag to disable the redownload of all your packages
conda remove --name old_name --all # or its alias: `conda env remove --name old_name`
#There are several drawbacks of this method:
# time consumed on copying environment's files,
# temporary double disk usage.
@mbprtpnix
mbprtpnix / install-configure-wg.sh
Created February 25, 2021 15:24 — forked from mrtrkmn/install-configure-wg.sh
Basic installation of WireGuard on Server
#!/bin/bash
PeerPublicKey="<peer-public-key>"
sysctl -w net.ipv4.ip_forward=1
add-apt-repository -y ppa:wireguard/wireguard
apt-get update && apt-get upgrade -y
apt-get install -y wireguard-dkms wireguard-tools
apt-get install -y wireguard
wg genkey | tee privatekey | wg pubkey > publickey

Wireguard setup

Installation

A comprehensive list of installation methods can be found here https://www.wireguard.com/install/

Keys

Generate keys on each device.

umask 077
@mbprtpnix
mbprtpnix / wireguard.sh
Created February 25, 2021 15:21 — forked from my0419/wireguard.sh
Wireguard Installation
#!/bin/bash
SERVER_HOST=$(ip addr | grep 'inet' | grep -v inet6 | grep -vE '127\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}' | grep -oE '[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}' | head -1)
SERVER_PORT=51820
PRIVATE_SUBNET="10.8.0.1/24"
CLIENT_SUBNET="10.8.0.2/32"
echo "deb http://deb.debian.org/debian/ unstable main" > /etc/apt/sources.list.d/unstable.list
printf 'Package: *\nPin: release a=unstable\nPin-Priority: 90\n' > /etc/apt/preferences.d/limit-unstable
apt -y update
apt -y install wireguard
@mbprtpnix
mbprtpnix / WireGuard Complete Installation
Created February 25, 2021 15:20 — forked from amanjuman/WireGuard Complete Installation
WireGuard Complete Installation
sudo apt-get update && sudo apt-get -y upgrade && sudo apt-get autoremove -y
sudo apt install software-properties-common && sudo apt install linux-headers-$(uname -r)
sudo add-apt-repository ppa:wireguard/wireguard
sudo apt install wireguard wireguard-dkms wireguard-tools resolvconf -y
wg genkey | sudo tee /etc/wireguard/privatekey | wg pubkey | sudo tee /etc/wireguard/publickey
ifconfig
sudo nano /etc/wireguard/wg0.conf
@mbprtpnix
mbprtpnix / README.md
Created February 25, 2021 14:10 — forked from etiennetremel/README.md
Simple Wireguard setup as VPN server and multiple clients

Simple WireGuard configuration

1 server, 2 clients

Getting started

Install Wireguard on all machines.

Generate all keys

@mbprtpnix
mbprtpnix / startup-gc.sh
Last active February 22, 2021 15:43
script
#!/bin/bash
pacman \
-Syyu \
--needed \
--noconfirm \
reflector \
bash-completion \
python \
neovim \
@mbprtpnix
mbprtpnix / archtweaks.md
Created February 15, 2021 09:03 — forked from lbrame/archtweaks.md
Tweaks I've made to my Arch Linux installation

Arch Linux tweaks

This is a collection of the tweaks and modification I've made to my Arch Linux installation over the months. These may be applicable to other distros, but please check first before doing anything. I also included Arch Wiki references for all the procedures I mentioned. My recommendation is not to blindly follow this gist but to always check with the Arch Linux wiki first. Things move fast and by the time you're reading this my gist may be out of date. Lastly, the golden rule: never execute a command you don't understand.

Installing the KDE Plasma desktop

My current DE of choice is KDE's Plasma. I find it just about perfect.

There are various ways to install it on Arch. The most popular one is to install plasma and plasma-applications, but I don't like doing that because it comes with too many programs I'll never use. I, instead, install the base plasma group, remove the few extra packages that come with it, then I finish off by installing a few KDE apps that don't come with th