Skip to content

Instantly share code, notes, and snippets.

View adkdev's full-sized avatar
🎯
Focusing

Adisak P. adkdev

🎯
Focusing
View GitHub Profile
@adkdev
adkdev / windowns_invert_mouse_direction.md
Created April 16, 2024 21:32
Reverse Mouse Wheel scroll on Windows

Copy from Jason Go's answer : https://answers.microsoft.com/en-us/windows/forum/all/reverse-mouse-wheel-scroll/657c4537-f346-4b8b-99f8-9e1f52cd94c2

Hello to all avid readers of Microsoft Community!

I am Jason Go, a developer and a postgrad computer science major. I made a script that will solve this issue the EASIEST and FASTEST way.

To set the scroll direction of your mouse, do the following steps:

Step 1:

Open Windows PowerShell in Administrator Mode. You can do this by going to Start Menu, type PowerShell, and click Run as Administrator.

@adkdev
adkdev / alacritty.toml
Created April 16, 2024 03:23
My Alacritty configs (with WSL on Windows)
# Docs - https://alacritty.org/config-alacritty.html
# Themes - https://github.com/alacritty/alacritty-theme
# import = [ "C:\\Users\\adkdev\\AppData\\Roaming\\alacritty\\themes\\github_dark.toml" ]
import = [ "C:\\Users\\adkdev\\AppData\\Roaming\\alacritty\\themes\\monokai_pro.toml" ]
shell = { program = "wsl", args = ["--cd ~"] }
# working_directory = "$HOME"
[env]
@adkdev
adkdev / shell-setup.ps1
Created June 12, 2023 08:31 — forked from mikepruett3/shell-setup.ps1
Packages to install via scoop, winget, choco, and other tools...
<#
.SYNOPSIS
Script to Initialize my custom powershell setup.
.DESCRIPTION
Script uses scoop
.NOTES
**NOTE** Will configure the Execution Policy for the "CurrentUser" to Unrestricted.
Author: Mike Pruett
Date: October 18th, 2018
@adkdev
adkdev / dbeaver_pwd.sh
Created October 18, 2022 04:12
Recover password from DBeaver connections on MacOS
# from so-random-dude's answer at https://stackoverflow.com/a/39928445
# and Tatsh's answer at https://stackoverflow.com/a/64726416
openssl aes-128-cbc -d -K babb4a9f774ab853c96c2d653dfe544a -iv 00000000000000000000000000000000 -in "${HOME}/Library/DBeaverData/workspace6/General/.dbeaver/credentials-config.json" | dd bs=1 skip=16 2>/dev/null | jq
@adkdev
adkdev / append_str_to_csv.sh
Last active September 24, 2021 10:27
Append string on each line to csv file
# source : https://stackoverflow.com/a/66561835
sed -E 's/'$'\r''?$/,"active"/' file.csv > out.csv
@adkdev
adkdev / main.py
Last active November 15, 2022 09:46
Braze API Mockup for local dev
"""
Braze API Mocking (J)
> Install dependencies ->
$ pip install fastapi
$ pip install "uvicorn[standard]"
> Start server ->
$ uvicorn main:app --reload
@adkdev
adkdev / airflow_test_fn_call.py
Created September 21, 2021 10:48
Test kwargs for Airflow function call
import pendulum
kwargs = {
"execution_date": pendulum.today() - timedelta(days=1),
"next_execution_date": pendulum.today(),
}
test_fn(**kwargs)
exit()
@adkdev
adkdev / avro2json.py
Created August 22, 2021 07:15
Convert Avro document to Json in Python using fastavro
import fastavro
import json
import os
ymd = "2021-08-21"
s3_path = "path/to/avro/fils/with/date={}"
data = []
for i in range(0, 24):
@adkdev
adkdev / add_exif_date.py
Created August 2, 2021 08:59
Add Exif date for the missing
from datetime import datetime
from os import listdir
from os.path import isfile, join
import piexif
img_dir = "./img/"
files_in_dir = [f for f in listdir(img_dir) if isfile(join(img_dir, f))]
for file in files_in_dir:
@adkdev
adkdev / golang.org.code.highlight.user.js
Created June 7, 2021 08:09
Golang.org code highlight
// ==UserScript==
// @name Golang.org code highlight
// @namespace https://www.netroby.com/
// @version 0.3
// @description Add code highlight in golang.org
// @author netroby
// @include https://golang.org/*
// @include https://godoc.org/*
// @grant none
// ==/UserScript==