Skip to content

Instantly share code, notes, and snippets.

C0nw0nk /
Last active February 2, 2023 14:20
entware synology nas add create scheduled task to run at boot custom script user root
# Create Autostart Task
# Create a triggered user-defined task in Task Scheduler.
# Goto: DSM > Control Panel > Task Scheduler
# Create > Triggered Task > User Defined Script
# General
# Task: Entware
# User: root
# Event: Boot-up
C0nw0nk / remove_last_folder.cmd
Last active January 29, 2023 17:05
remove last directory folder from variable batch file command line
View remove_last_folder.cmd
@echo off & setLocal EnableDelayedExpansion
set root_path="%~dp0"
set "remove_last_folder=%root_path:"=%"
::remove last back slash
set "remove_last_folder=%remove_last_folder:~0,-1%"
::last folder into var
set "last1=%remove_last_folder:\=" & set "lastfolder1=%"
::remove last folder from var
C0nw0nk / privateinternetaccess-PIA.txt
Last active January 26, 2023 18:17
Private Internet Access Streaming Optimization sub domains to use
View privateinternetaccess-PIA.txt
You can use these in ovpn files wireguard as remote connection point you will be appointed a random streaming optimized IP address upon connection
United Kingdom UK streaming Optimized servers
Sweden Swiss streaming optimized servers
denmark danish streaming optimized servers
C0nw0nk / privateinternetaccess
Created January 13, 2023 13:57
Private internet Access | PIA | Dedicated IP .ovpn .conf openvpn wireguard how to login and use dedicated IP
View privateinternetaccess
To login and use your dedicated IP with private internet access obviously specifying your custom IP is needed.
But you do not use your username use your dedicated hash token they provide to you with "dedicated_ip_DIP" at the start.
Username :
Password :
#Openvpn file
C0nw0nk /
Last active December 31, 2022 14:20
sudo docker ps
sudo docker exec -ti emby1 bash
sudo echo 16384 | sudo tee /proc/sys/fs/inotify/max_user_watches
sudo echo fs.inotify.max_user_watches=16384 | sudo tee -a /etc/sysctl.conf
sudo sysctl -p
sudo docker exec -ti plex1 bash
sudo echo 16384 | sudo tee /proc/sys/fs/inotify/max_user_watches
sudo echo fs.inotify.max_user_watches=16384 | sudo tee -a /etc/sysctl.conf
C0nw0nk / watchtower.yml
Last active December 31, 2022 04:52
watchtower synology nas auto updater
View watchtower.yml
# enable SSH access login then
# mkdir -p /volume1/docker/watchtower && cd /volume1/docker/watchtower && sudo docker-compose -f watchtower.yml up -d
# 1 on container name using synology nas docker to create images automatically puts a number there so you gotta use the number if created using docker
image: containrrr/watchtower:latest
container_name: watchtower1
- TZ=Europe/London
C0nw0nk / undetectable-chromedriver-patcher.ps1
Last active December 3, 2022 20:01
Powershell Script to patch Chromedriver.exe for selenium to make it undetectable msedgedriver.exe and operadriver.exe
View undetectable-chromedriver-patcher.ps1
$regexA = 'cdc_.{22}';
$ThisFile = 'C:\Users\MEDIA-SERVER\Desktop\chromedriver.exe'
#$ThisFile = 'C:\Users\MEDIA-SERVER\Desktop\msedgedriver.exe' #Yes this can also be patched
#$ThisFile = 'C:\Users\MEDIA-SERVER\Desktop\operadriver.exe' #Yes this can also be patched
$new_date="10/10/2000 13:37:02";
if ( (Get-ChildItem $ThisFile).CreationTime -notlike $new_date ) {
Write-Output "Patching now";
} else {
Write-Output "is already patched";
C0nw0nk / vivaldi_chromedriver_version.cmd
Created November 27, 2022 11:05
get vivaldi chromedriver current supported version
View vivaldi_chromedriver_version.cmd
@echo off & setLocal EnableDelayedExpansion
::get vivaldi chromedriver version to extract the right file that will be compatible
for /f "tokens=*" %%a in ('%alias% /s ^| FIND ^"version^" 2^>Nul') do (
set framework_version=%%a
::set "framework_version=!framework_version:~1,-1!"
set "framework_version=!framework_version:.=!"
set "framework_version=!framework_version: =!"
set "framework_version=!framework_version:Version=!"
C0nw0nk / hybrid_batch_file_js_vbs_cmd.cmd
Created November 14, 2022 10:50
hybrid batch file for running batch code vbscript and javascript all inline in command line
View hybrid_batch_file_js_vbs_cmd.cmd
@if (@This==@IsBatch) @then
@echo off & setLocal EnableDelayedExpansion
:: Copyright Conor McKnight
:: Hybrid batch file for running inline batch code, VBScript and Javascript from the same .cmd or .bat file
set site=""
::Start Javascript Execution function and args
C0nw0nk / batch_file_my_ip.cmd
Created November 14, 2022 07:11
batch file to get public facing ip address without any external files or help
View batch_file_my_ip.cmd
@if (@This==@IsBatch) @then
@echo off & setLocal EnableDelayedExpansion & CHCP 65001 >NUL
:: Copyright Conor McKnight
:: Execute Javascript without needing to install anything
:: store javascript output in batch file variable
set site=""
for /f "tokens=*" %%a in ('