Skip to content

Instantly share code, notes, and snippets.

View Kambaa's full-sized avatar

KambaAbi Kambaa

  • KambaAbi
  • Istanbul, Turkey
View GitHub Profile
$ ffmpeg \
-re \
-i /path/to/video.mp4 \
-c:v libx264 \
-b:v 6000K \
-maxrate 6000K \
-pix_fmt yuv420p \
-s 1920x1080 \
-profile:v main \
-preset veryfast \
$ ffmpeg \
-f avfoundation \
-video_size 1920x1080 \
-framerate 30 \
-i "2:2" \
-c:v libx264 \
-b:v 6000K \
-maxrate 6000K \
-pix_fmt yuv420p \
-r 30 \
@Kambaa
Kambaa / README.md
Last active February 2, 2024 07:15
RustDesk Self Hosted Server Working Example

RustDesk Server Working Example

This example runs a RustDesk server (with detailed/debug logs enabled and secured with id_ed25519 key that only you can use in your machines if you configure RustDesk clients) and you can use the server resources instead of RustDesk public resources.

@Kambaa
Kambaa / gist:062b9256bff190e59ebfcd113789df49
Last active May 13, 2023 01:15
global cors definition spring boot
https://stackoverflow.com/a/66590699/1020512
https://reflectoring.io/spring-cors/
https://www.tutorialspoint.com/spring_boot/spring_boot_cors_support.htm
https://www.baeldung.com/spring-cors
https://stackoverflow.com/questions/36968963/how-to-configure-cors-in-a-spring-boot-spring-security-application
@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

@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 / steps.md
Last active November 18, 2023 10:30
Enable Wake On LAN on Proxmox/Debian
@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 / 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