Skip to content

Instantly share code, notes, and snippets.

View retspen's full-sized avatar

Anatoliy Guskov retspen

View GitHub Profile
@retspen
retspen / com.cloudflare.Connect.desktop
Created May 16, 2022 19:33
Cloudflare warp connect and disconnect desktop files for quick access from gnome search menu
[Desktop Entry]
Type=Application
Version=1.2
Name=Cloudflare Connect
Comment=Connect to the Zero Trust Tunnel
Exec=warp-cli connect
StartupNotify=false
Keywords=warp connect cloudflare vpn
Icon=zero-trust-connected
Terminal=false
@retspen
retspen / installing_cuda_on_azure_nc_tesla_k80_ubuntu.md
Created January 23, 2020 09:40 — forked from genp/installing_cuda_on_azure_nc_tesla_k80_ubuntu.md
Installing NVIDIA CUDA on Azure NC with Tesla K80 and Ubuntu 16.04

Create Root CA (Done once)

Create Root Key

Attention: this is the key used to sign the certificate requests, anyone holding this can sign certificates on your behalf. So keep it in a safe place!

openssl genrsa -des3 -out rootCA.key 4096
@retspen
retspen / pf_nat
Created March 2, 2018 18:27
Enable NAT on macOS
#!/bin/bash
cat > /usr/local/etc/pf-nat.conf << EOF
nat on en0 from vnic1:network to any -> (en0)
EOF
sudo pfctl -d
sudo sysctl -w net.inet.ip.forwarding=1
sudo pfctl -f /usr/local/etc/pf-nat.conf -e
@retspen
retspen / libvirt
Created December 9, 2017 07:33
Libvirt tips
# Command line for libvirt
<qemu:commandline>
<qemu:arg value='-drive'/>
<qemu:arg value='file=/var/lib/libvirt/centos.img,format=raw,if=none,id=drive-nvme-disk0'/>
<qemu:arg value='-device'/>
<qemu:arg value='nvme,id=drive-nvme-disk0,serial=serial0'/>
</qemu:commandline>
# IO tune
<disk type='file' device='disk'>
@retspen
retspen / build-key
Last active January 4, 2017 14:58
Creating .ovpn with CA, Crt and Key for mobile
#!/bin/sh
# Make a certificate/private key pair using a locally generated
# root certificate.
OPENVPN_KEYS=$EASY_RSA/keys
IPADDR=$(ifconfig eth0 | grep 'inet addr:'| cut -d: -f2 | awk '{print $1}')
export EASY_RSA="${EASY_RSA:-.}"
#"$EASY_RSA/pkitool" --interact $*
"$EASY_RSA/pkitool" $*