- Configure git.
# ~/.config/git/config
[sendemail]
confirm = auto
smtpServer = smtp.gmail.com
smtpServerPort = 587
smtpEncryption = tls
smtpUser = <gmail email address>
import os | |
import sys | |
from xml.sax import parse | |
from xml.sax.saxutils import XMLGenerator | |
class CycleFile(object): | |
def __init__(self, filename): | |
self.basename, self.ext = os.path.splitext(filename) | |
self.index = 0 |
# ~/.config/git/config
[sendemail]
confirm = auto
smtpServer = smtp.gmail.com
smtpServerPort = 587
smtpEncryption = tls
smtpUser = <gmail email address>
WSL2 uses Hyper-V for networking. The WSL2 network settings are ephemeral and configured on demand when any WSL2 instance is first started in a Windows session. The configuration is reset on each Windows restart and the IP addresses change each time. The Windows host creates a hidden switch named "WSL" and a network adapter named "WSL" (appears as "vEthernet (WSL)" in the "Network Connections" panel). The Ubuntu instance creates a corresponding network interface named "eth0".
Assigning static IP addresses to the network interfaces on the Windows host or the WSL2 Ubuntu instance enables support for the following scenarios:
Disable vim automatic visual mode on mouse select | |
issue: :set mouse-=a | |
add to ~/.vimrc: set mouse-=a | |
my ~/.vimrc for preserving global defaults and only changing one option: | |
source $VIMRUNTIME/defaults.vim | |
set mouse-=a |
https://www.cyberciti.biz/faq/dhclient-etcresolvconf-hooks/ | |
chattr +i /etc/resolv.conf | |
/etc/dhcp/dhclient-enter-hooks.d/nodnsupdate | |
make_resolv_conf(){ | |
: | |
} | |
chmod +x /etc/dhcp/dhclient-enter-hooks.d/nodnsupdate |
https://thegeekpage.com/fix-nslookup-works-but-ping-fails-in-windows-10/ | |
netsh winsock reset catalog | |
netsh int ip reset reset.log | |
ipconfig /flushdns | |
ipconfig /registerdns | |
route /f |
Reinstaller for Debian: https://github.com/bohanyang/debi | |
wget -O debi.sh https://raw.githubusercontent.com/bohanyang/debi/master/debi.sh | |
chmod a+rx debi.sh | |
./debi.sh --ssh-port 543 --hostname HostName --user bkaindl --password PASS --ethx --bbr --cloud-kernel --timezone Europe/Vienna | |
reboot -f | |
# Source: | |
# https://lowendtalk.com/discussion/171061/oracle-cloud-free-tier-reinstalling-of-os | |
# until ssh -v $host.kaindl.dev;do sleep 10;done | |
# Afterwards: | |
sudo apt install unattended-upgrades |
add_filter('tutor_courses_base_slug', 'change_tutor_course_slug'); | |
/** | |
* @param $slug | |
* @return string | |
*/ | |
if ( ! function_exists('change_tutor_course_slug')){ | |
function change_tutor_course_slug($slug){ | |
$slug = 'example-course-slug'; | |
return $slug; |