Skip to content

Instantly share code, notes, and snippets.

View Kambaa's full-sized avatar

KambaAbi Kambaa

  • KambaAbi
  • Istanbul, Turkey
View GitHub Profile
@Kambaa
Kambaa / Docker-WSL-Manuel-Yukleme.md
Last active February 22, 2024 20:20
Docker'ı WSL2 ile çalışan Debian makinasına yüklemek

Docker'ı WSL2 ile çalışan Debian makinasına yüklemek

Docker desktop zaten yavaş olan kodlama yaptığım makinamı iyice yavaşlatınca, direk WSL'de çalışan linux'a docker'ı elle kurup kullanmayı tercih ettim. Aşağıdaki adımları her seferinde farklı sitelerden bulup ayarlamaktansa buraya yazmayı tercih ettim.

1.Docker'u yükleme:

Aşağıdaki komutları docker'sın resmi sitesinde yazan yerlerden aldım. Kısaca docker uygulama bilgilerini Debian yükleme aracı apt'nin güvenli bir şekilde alıp okumasını sağlayıp docker'ı ve docker compose'u yükletiyorum.

# Add Docker's official GPG key:
@Kambaa
Kambaa / Readme.md
Created February 21, 2024 14:47
G**gle's TTS demosunu özel amaçlı kullanmak adına indirebilmek

G**gle TTS Demosunu özel amaçlı kullanmak adına indirebilmek

  • https://cloud.google.com/text-to-speech#demo adresine gidip demo metninizi hazırlayın,
  • devtools'unuzu açıp(taryıcı F12 tuşu) ağ sekmesinde yazdığınızı dinleyin ve aşağıdaki resimdeki gibi son gelen istekler içerisinde ilgili isteği bulun. resim
  • audioContent kısmındaki değer kopyalayıp bilgisayarınızda bir dosya olarak kaydedin. (ör. audio.txt)
  • son olarak aşağıdaki kodu çalıştırıp metin dosyasından ses dosyasını elde edin(bu adımdaki kod linux komutudur, git bash ya da wsl içinde halledebilirsiniz) base64 -d audio.txt > audio.wav
@Kambaa
Kambaa / Readme.md
Last active February 20, 2024 20:43
Windows Korumalı Alanı Ayarlamaları (Readme.md'yi okuyun) Windows Sandbox configuration examples (translate Readme.md)

Windows Korumalı Alanı (Windows SandBox) Ayarlamaları

Sisteme herhangi bir dosya bulaştırmadan, kapattığınızda tüm windows değişikliklerinin yok olacağı bir korumalı alan düşünün. Virüz olabileceğini düşündüğünüz dosyaları sisteminizde açmaktansa, hızlı bir şekilde korumalı alanı açıp, içerisinde kontrol edip, kapattığınızda sisteminizde herhangi bir sıkıntıya sebep olmadan işe yarayan harika bir ürün. Özelleştirme ayarlarını bildiğinizde, bilgisayarınızdaki bir klasöre bağlayıp, sadece o klasöre dosyaların kaydolmasını sağlayıp, isterseniz her açılışta otomaik çalışmasını istediğiniz komutları ayarlayabilirsiniz.

Eklenen örnek ayarlamalar:

@Kambaa
Kambaa / Readme.md
Last active April 28, 2025 09:30
powershell quit alias & git autocomplete

Powershell goodies:

Powershell (newer or older) add a profile file (like linux's .bash_profile)

  • open powershell(or pwsh) as administrator
  • check if file exists with this command:Test-Path $profile or try to directly open it with this one: notepad $PROFILE
  • if error occurs run this command to add one New-Item -ItemType File -Path $profile -Force
  • open the profile file:notepad $PROFILE

Define an alias q as quit:

  • open powershell(or pwsh) as admin and the profile file: notepad $PROFILE
@Kambaa
Kambaa / userChrome.css
Created January 12, 2024 23:14
Firefox Styling
/* Base color for the theme, dependent on whether it's a light theme or not */
@media (prefers-color-scheme: dark) {
:root {
--accent-color: #1c1b22;
}
}
@media (prefers-color-scheme: light) {
:root {
--accent-color: #FAFAFC;
@Kambaa
Kambaa / dockerfile
Created January 3, 2024 13:20
Example jar file docker build file
FROM openjdk:17
ENV ORTAM="dev"
ENV APPVERSION="dockerdev-0.0.1-SNAPSHOT"
# lazım olma ihtimal varsa ekleriz, kalsın....
#ARG JVM_ARGS=--add-modules java.se --add-exports java.base/jdk.internal.ref=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.nio=ALL-UNNAMED --add-opens java.base/sun.nio.ch=ALL-UNNAMED --add-opens java.management/sun.management=ALL-UNNAMED --add-opens jdk.management/com.sun.management.internal=ALL-UNNAMED
RUN groupadd -r app -g 1000 && useradd -u 1000 -r -g app -m -d /opt/app -s /sbin/nologin -c "App user" app && chmod 755 /opt/app
RUN rm /etc/localtime; ln -s /usr/share/zoneinfo/Europe/Istanbul /etc/localtime
WORKDIR /opt/app
COPY --from=build target/myapp-0.0.1-SNAPSHOT.jar app.jar
@Kambaa
Kambaa / idea-portable-config.md
Created December 14, 2023 08:02
idea portable config
  • add these inside <IDEA_INSTALL_DIR>\bin\idea.properties
idea.config.path=${idea.home.path}/appdata/config
idea.system.path=${idea.home.path}/appdata/system
idea.plugins.path=${idea.home.path}/appdata/plugins
idea.log.path=${idea.home.path}/appdata/log
@Kambaa
Kambaa / steps.md
Last active November 18, 2023 10:30
Enable Wake On LAN on Proxmox/Debian
@Kambaa
Kambaa / backup_volumes_of_docker_compose_services.txt
Last active October 4, 2023 14:59
Backup volumes of docker-compose services
THIS SOLUTION ASSUMES THAT YOUR service container has tar installed and to be able to be used!
latest update:
i wrote 2 commands onmy .bash_profile:
checkvol <DOCKER_COMPOSE_SERVICE_NAME>
checkvol gitea
dockerbackup <DOCKER_COMPOSE_SERVICE_NAME> <DIR_TO_COPY> <FILENAME_TO_COMPRESS>
@Kambaa
Kambaa / 2025-StrokesPlus multimonitor new config.md
Last active March 7, 2025 22:54
StrokesPlus multimonitor switching notes

2025 Config:

I rewrote the lua scripts. My use case is for the left(vertical) and right(big one) monitors are:

  • If swiped left, move the active window to the left monitor and set the width to monitor width and height to 500, and windows top position is pre-configured for some apps.
  • If swiped right move the active window to the right monitor and toggle maximize.
  • Above 2 configs should not work for my shortcut app(app width change brokes usability).
  • If window is already on the left monitor, left swipe does nothing.
  • If window is already on the right monitor, right swipe toggles maximization

1. ZZ- Move To Left Monitor And Custom Resize