Skip to content

Instantly share code, notes, and snippets.

View DoganM95's full-sized avatar

Dogan DoganM95

  • Germany
View GitHub Profile
@DoganM95
DoganM95 / css_to_react_inline.md
Created June 1, 2024 04:13
CSS to React inline style conversion using VSCode Regex Replacer

Intro

CSS has a different syntax than react's inline css, which this regex pattern aims to solve by transforming it (right side only).
CSS also kebap-case sytnax and react uses camelCase, making a direct usage of default css unusable (left side).
The current regex only fixes the right side, kebap to camel part needs to be done manually for now. Example

CSS

div {

Win 11 inplace password reset

Desctiption

You forgot your password, tutorials did not help because there is no utilman.exe and you don't want to create a third party password recovery/hacking disk on a usb drive? Follow along.

Guide

  • Get into recovery menu
    • On any pc:
      • Boot into lockscreen, hold shift key and klick on reboot wuth the mouse, then release shift
    • On lenovo pc's (my case)
@DoganM95
DoganM95 / octopi.md
Last active May 1, 2022 11:17
OctoPrint on Pi setup routine

Setup

  • Get Raspberry Pi Imager
  • Follow Installing Octo Pi section
  • open boot drive and add wpa_supplicant.conf
  • Fill content with correct data, template:
    country=us
    update_config=1
    ctrl_interface=/var/run/wpa_supplicant
@DoganM95
DoganM95 / export_certs.sh
Last active May 11, 2022 21:52
Export Synology certs on update to a destination directory. In settings, find TaskScheduler, create a new task (user defined script), paste the script, modify destiantion paths and choose interval.
sourcePath="/usr/syno/etc/certificate/_archive/$(cat /usr/syno/etc/certificate/_archive/DEFAULT)"
destinationPath="/volume1/docker/.ssl"
certDiff=$(diff -w $sourcePath/RSA-cert.pem $destinationPath/cert.pem)
chainDiff=$(diff -w $sourcePath/RSA-chain.pem $destinationPath/chain.pem)
privKeyDiff=$(diff -w $sourcePath/RSA-privkey.pem $destinationPath/privkey.pem)
certUpdated=0
if [ -z "$certDiff" ] && [ -e $destinationPath/cert.pem ]; then
@DoganM95
DoganM95 / WifiConnectionHandlerEsp32.cpp
Last active May 1, 2022 10:38
Handles wifi connection in a separate thread in an esp32 to make wifi just work and enable focusing on the important stuff.
// Settings for Config.h
char* WIFI_SSID = "Your_WIFI_ssid";
char* WIFI_PW = "Your_WIFI_password";
// Main Code
int wifiConnectionTimeout = 10000;
ushort cycleDelayInMilliSeconds = 100;
const int wifiHandlerThreadStackSize = 10000;
unsigned long long wifiReconnectCounter = 0;
TaskHandle_t wifiConnectionHandlerThreadFunctionHandle;
@DoganM95
DoganM95 / resume.json
Last active June 3, 2024 13:01
My CV
{
"basics": {
"name": "Dogan Mermertas",
"label": "Software Engineer (Computer Science BSc.)",
"summary": "A computer scientist, whose main emphasis is software engineering, with strong interest in embedded systems (Hardware & Electrical Engineering, especially using ESP32's and Raspberry Pi's). I have once worked in a company as the only developer, gaining experience in leading projects on my own. Nevertheless, I also enjoy working in teams to achieve a complex goal quickly and with different ideas of each member flowing in. Computer Science is not only what i have studied, but programming and automation are also my hobbies and passion. Open-source enthusiasm is also one of my characteristics, therefore I'm trying to make the source codes of my personal projects public on Github.com, as far as possible.",
"image": "https://gist.github.com/assets/38842553/4ae69284-8a1d-4cf3-aeca-0b727188d309",
"email": "dogan.mermertas@outlook.de",
"location": {
"city": "Munich",
"countr
@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
@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 / 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 / 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