Skip to content

Instantly share code, notes, and snippets.

View DoganM95's full-sized avatar

Dogan DoganM95

View GitHub Profile
@DoganM95
DoganM95 / FFS-missing-folder-creator.ps1
Last active May 14, 2021 16:47
FreeFileSync-missing-folder-creator
[xml]$xml = Get-Content "C:\Users\$env:UserName\OneDrive\Documents\BatchRun.ffs_batch"
$lefts = Select-Xml "//Left" $xml
$rights = Select-Xml "//Right" $xml
$allPaths = New-Object System.Collections.ArrayList;
$lefts | ForEach-Object { $allPaths.Add( $_.Node.'#text') | out-null }
$rights | ForEach-Object { $allPaths.Add( $_.Node.'#text') | out-null }
$created = New-Object System.Collections.ArrayList;
$skipped = New-Object System.Collections.ArrayList;

Remove all dangling images

Windows

docker rmi $(docker images -q -f dangling=true)

Linux

docker rmi $(docker images -q -f dangling=true)
@DoganM95
DoganM95 / ubuntu_customization_setup.sh
Last active November 12, 2021 08:13
My Personal ubuntu customization, in case i have to reinstall ubuntu and need my config back
#!/bin/bash
# Set display resolution to 4k
xrandr --output eDP-1 --mode 3840x2160
# Set display scale to 125% (=1.75 to xrandr)
xrandr --output eDP-1 --scale 1.75x1.75
# Move "Show Applications" button to the left side of the dock
gsettings set org.gnome.shell.extensions.dash-to-dock show-apps-at-top true
@DoganM95
DoganM95 / PlayNite_gamepaths_updater.ps1
Last active March 23, 2021 18:01
Updates the path of all games in playnite library to a new one. Executable names are kept untouched
# Configure the following 3 paths before using
$pathToReplace = "N:\\Library\\Games\\Sony\\PSP"
$replacementPath = "N:\\Games\\Sony\\PSP"
$pathOfGameSettings = "C:\Users\Dogan\OneDrive\Portable Apps\Playnite\library\games"
# Script
$pathToReplace = $pathToReplace.Replace("\\", "\\\\")
$processedFileCount = 0;
Get-ChildItem $pathOfGameSettings -Filter *.json |
Foreach-Object {
@DoganM95
DoganM95 / ps2_iso_renaming_post-processing.bru
Created March 23, 2021 23:16
PS2 iso renaming tool "fixiso.exe" adds useful information, but not well formatted. This script for Bulk Rename Utility reformats the name afterwards
[General]
Path=""
[Regular Expressions]
Match="(\w{4})(_)(\d{3})(\.)(\d{2})(\.)(.*?)(\(|\[)(.*)"
Replace="\7 [\1-\3\5] \8\9"
Include Extension=0
Simple=0
v2=0
[Filename]
@DoganM95
DoganM95 / zones-settings.json
Created May 10, 2021 16:38
Microsoft PowerToys Custom UWQHD 1440p FancyZone (snippet to insert after "devices")
"custom-zone-sets": [
{
"uuid": "{A7B1BF4C-A283-4CB6-9055-1A8876F060C9}",
"name": "Custom layout 2",
"type": "canvas",
"info": {
"ref-width": 3440,
"ref-height": 1400,
"zones": [
{
@DoganM95
DoganM95 / path_fixer.md
Last active May 1, 2022 10:42
Windows path fixer using regex in vscode, so each single \ becomes \\ ->e.g. C:\Windows\System32 becomes C:\\Windows\\System32

search for ([^\\])(\\)([^\\])

replace with $1\\\\$3

@DoganM95
DoganM95 / SystemUI_Tuner_Android_permission_first_stage.ps1
Last active February 14, 2024 08:13
SystemUI Tuner Android permission granting scripts
adb shell pm grant com.zacharee1.systemuituner android.permission.WRITE_SECURE_SETTINGS
@DoganM95
DoganM95 / BlynkConnectionHandlerEsp32.cpp
Last active February 6, 2022 14:33
ESP32 thread snippets
// Settings for Config.h
const char* BLYNK_AUTH = "AuthTokenGoesHere"; // Get the token in the Blynk app on your phone (project settings)
const bool BLYNK_USE_LOCAL_SERVER = false;
// Following settings are obsolete, if BLYNK_USE_LOCAL_SERVER is set to false
const char* BLYNK_SERVER = "yourBlynkServer.ddns.net";
const unsigned short int BLYNK_PORT = 8080;
// Code in sketch
const int BlynkHandlerThreadStackSize = 10000;
ushort cycleDelayInMilliSeconds = 100;
@DoganM95
DoganM95 / Show_network_password-Win_10.ps1
Last active February 14, 2024 08:21
Get a wifi password for a specific ssid using windows 10 command line
# List all saved ssid's
netsh wlan show profiles
# Get cleartext password of specific ssid (replace "profile")
netsh wlan show profile name=profile key=clear