Skip to content

Instantly share code, notes, and snippets.

View poqdavid's full-sized avatar
💭
Loading...

poqdavid poqdavid

💭
Loading...
View GitHub Profile
@poqdavid
poqdavid / config1
Created February 22, 2024 15:02
WireGuard
[Interface]
PrivateKey = <Key>
Address = <IPv4>/32, <IPv6>/128
DNS = 127.0.0.100, 127.0.0.200, fd00:0:0:100::1, fd00:0:0:200::1
MTU = 1280
PostUp = powershell -command "$wgInterface = Get-NetAdapter -Name %WIREGUARD_TUNNEL_NAME%; route add 0.0.0.0 mask 0.0.0.0 0.0.0.0 if $wgInterface.ifIndex metric 9999; Set-NetIPInterface -InterfaceIndex $wgInterface.ifIndex -InterfaceMetric 9999;"
PreDown = powershell -command "$wgInterface = Get-NetAdapter -Name %WIREGUARD_TUNNEL_NAME%; route delete 0.0.0.0 mask 0.0.0.0 0.0.0.0 if $wgInterface.ifIndex metric 9999; Set-NetIPInterface -InterfaceIndex $wgInterface.ifIndex -InterfaceMetric 9999;"
Table = off
[Peer]
@poqdavid
poqdavid / WithKillswitchEnabled
Created February 18, 2024 18:01
My routing tables
IPv4 Route Table
===========================================================================
Active Routes:
Network Destination Netmask Gateway Interface Metric
0.0.0.0 0.0.0.0 192.168.45.1 192.168.45.2 261
0.0.0.0 0.0.0.0 On-link 10.67.5.33 0
10.67.5.33 255.255.255.255 On-link 10.67.5.33 256
127.0.0.0 255.0.0.0 On-link 127.0.0.1 331
127.0.0.1 255.255.255.255 On-link 127.0.0.1 331
127.255.255.255 255.255.255.255 On-link 127.0.0.1 331
@poqdavid
poqdavid / Engine.ini
Last active May 8, 2023 01:10
My Hogwarts Legacy settings
[SystemSettings]
r.TemporalAACurrentFrameWeight=0.45
r.TemporalAASharpen=0.1
r.VolumetricFog.VoxelizationShowOnlyPassIndex=0
r.VolumetricFog=0
r.TextureStreaming=1
r.Streaming.FramesForFu11Update=10
r.Streaming.PoolSize=4096
r.Streaming.LimitPoo1SizeToVRAM=1
r.Streaming.DefragDynamicBounds=1
@poqdavid
poqdavid / README_GeoIPDB_Instructions.md
Last active April 9, 2023 22:33
This gist contains a set of scripts and instructions for updating and reading Maxmind and DB-IP databases using bash. The scripts are written in bash and can be used to update the databases on a regular basis. The instructions provide detailed information on how to use the scripts.
@poqdavid
poqdavid / setip
Created June 21, 2022 02:12
Sets static IP for Android 11 hotspot
#!/system/bin/sh
NEW_SUBNET='192.168.43'
WIFI_INTERFACE='wlan0'
WIFI_INTERFACE_INFO=$(ip addr show dev ${WIFI_INTERFACE} | grep -m1 "$WIFI_INTERFACE:")
if [[ "$WIFI_INTERFACE_INFO" == *"state UP"* ]]; then
LOCAL_TABLE=$(awk '$2=="local_network" {print $1}' /data/misc/net/rt_tables)
@poqdavid
poqdavid / howto.md
Last active January 9, 2024 17:49
How to rename author and resign all commits

1. Rename author

Note that filter-repo deletes remote section in .git\config

git filter-repo --mailmap mymailmap --force

or

@poqdavid
poqdavid / update_dbip
Last active July 22, 2021 11:38
A simple bash script to update database from db-ip.com
#!/bin/bash
DATAFILE=/home/ubuntu/scripts/dbipdata/lastupdate
DATABASEDIR=/home/ubuntu/geoip
DATABASENAME=citylite.mmdb
DATABASEFULLPATH="/home/ubuntu/geoip/citylite.mmdb"
CURRENTDATE=`date +%Y-%m`
LASTUPDATE=``
MS.Internal.PtsHost.UnsafeNativeMethods.PTS.SecondaryException
HResult=0x80131500
Message=The calling thread cannot access this object because a different thread owns it.
Source=WindowsBase
StackTrace:
at System.Windows.Threading.Dispatcher.VerifyAccess()
at System.Windows.DependencyObject.GetValue(DependencyProperty dp)
at System.Windows.Documents.Paragraph.get_KeepWithNext()
at MS.Internal.Text.DynamicPropertyReader.GetKeepWithNext(DependencyObject element)
at MS.Internal.PtsHost.BaseParagraph.GetParaProperties(FSPAP& fspap, Boolean ignoreElementProps)
public static class ParagraphExtention
{
public static void Append(this Paragraph paragraph, string value = "", Brush background = null, Brush foreground = null, bool bold = false, bool italic = false, bool underline = false, bool waitUntilReturn = false)
{
Action append = () =>
{
Inline run = new Run(value);
if (background != null) run.Background = background;
if (foreground != null) run.Foreground = foreground;
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\SOFTWARE\Microsoft\Speech_OneCore\Isolated\<Needs to be replaced>\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Speech_OneCore\Voices\Tokens\MSTTS_V110_enUS_EvaM]
@="Microsoft Eva Mobile - English (United States)"
"LangDataPath"="%windir%\\Speech_OneCore\\Engines\\TTS\\en-US\\MSTTSLocenUS.dat"
"VoicePath"="%windir%\\Speech_OneCore\\Engines\\TTS\\en-US\\M1033Eva"
"409"="Microsoft Eva Mobile - English (United States)"
"CLSID"="{179F3D56-1B0B-42B2-A962-59B7EF59FE1B}"
[HKEY_CURRENT_USER\SOFTWARE\Microsoft\Speech_OneCore\Isolated\<Needs to be replaced>\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Speech_OneCore\Voices\Tokens\MSTTS_V110_enUS_EvaM\Attributes]