Skip to content

Instantly share code, notes, and snippets.

View lattice0's full-sized avatar
🦀

Lattice 0 lattice0

🦀
View GitHub Profile
docker run -v $OVPN_DATA:/etc/openvpn -d -p 1194:1194/udp --cap-add=NET_ADMIN --restart unless-stopped openvpn
@lattice0
lattice0 / gist:d0c3880ccc48c86e357f49cffa091c32
Last active July 17, 2018 23:18
proton VPN mass import
#First import all the files
for i in *.ovpn; do nmcli connection import file "$i" type openvpn; done
#Now save the script below on some location:
#!/bin/bash
@lattice0
lattice0 / userChrome.css
Created August 25, 2018 18:49
firefox multirow
/* Multi row tabs */
.tabbrowser-tab:not([pinned]) {
flex-grow:1 !important;
min-width:100px !important;
}
#tabbrowser-tabs .scrollbox-innerbox {
display: flex !important;
flex-wrap: wrap !important;
}
@lattice0
lattice0 / explode_openvpn.sh
Last active October 12, 2018 02:45
open vpn zainco configurations
#!/bin/bash
# This script will extract the certificate and key from an .ovpn file
# into their own files, which makes it possible to use them to configure
# the VPN using Ubuntu's network manager
# Usage example:
# >> ovpnconvert username.dev.ovpn
# You can keep following these instructions here:
@lattice0
lattice0 / fstab
Created October 7, 2018 08:39
fstab with external drive
proc /proc proc defaults 0 0
PARTUUID=c14edef9-01 /boot vfat defaults 0 2
PARTUUID=c14edef9-02 / ext4 defaults,noatime 0 1
PARTUUID=df63cda7-01 /media/external ext4 defaults,auto,nofail,users,rw 0 0
# a swapfile is not a swap partition, no line here
# use dphys-swapfile swap[on|off] for that
sudo mount -t cifs //192.168.0.3/Public /media/external
@lattice0
lattice0 / ovpn_install.sh
Last active November 12, 2018 01:14
open vpn docker fast install
SERVER_NAME="udp://cilinho.dyndns.org"
git clone https://github.com/kylemanna/docker-openvpn
cd docker-openvpn
sudo docker build -t openvpn .
OVPN_DATA="ovpn-data-example"
sudo docker volume create --name $OVPN_DATA
sudo docker run -v $OVPN_DATA:/etc/openvpn --log-driver=none --rm openvpn ovpn_genconfig -u $SERVER_NAME
sudo docker run -v $OVPN_DATA:/etc/openvpn --log-driver=none --rm -it openvpn ovpn_initpki
sudo docker run -v $OVPN_DATA:/etc/openvpn -d --restart unless-stopped -p 1194:1194/udp --cap-add=NET_ADMIN openvpn
sudo docker run -v $OVPN_DATA:/etc/openvpn --log-driver=none --rm -it openvpn easyrsa build-client-full zanella nopass
sudo bash -c 'sleep 4h; docker stop b6d'
/home/lz/cmake-3.14.0-rc2-Linux-x86_64/bin/cmake -DCMAKE_PREFIX_PATH=/home/lz/Qt5.11.2/5.11.2/gcc_64 .
qemu-img resize ubuntu-server.qcow2 +5G
then go into the machine you want to increase space, add a second ubuntu disk ,make it first bootable disk, turn on, resize with the disks app, shut down, take off second ubuntu