Skip to content

Instantly share code, notes, and snippets.

View gim-'s full-sized avatar
🤔

Andrejs Mivreniks gim-

🤔
View GitHub Profile
@gim-
gim- / docker-compose.yml
Last active June 16, 2025 17:06
Apicurio Studio via Docker Compose
# Run: docker compose up
# Then open http://localhost:8081 in a web browser
services:
apicurio-registry:
image: quay.io/apicurio/apicurio-studio:1.0.0.Beta1
environment:
QUARKUS_HTTP_CORS_ORIGINS: '*'
ports:
- 8080:8080
@gim-
gim- / neovim.APPLESCRIPT
Created November 24, 2024 14:41
AppleScript to open files using Nvim in kitty via Automator
on run {input, parameters}
set cmd to "nvim; exit"
if input is not {} then
set filePath to POSIX path of input
set cmd to "nvim \"" & filePath & "\"; exit"
end if
tell application "System Events"
set isRunning to (exists (processes where name is "kitty"))
end tell
@gim-
gim- / nvim-disable-arrow-keys.lua
Last active November 24, 2024 08:36
Nvim Disable Arrow Keys
local map = vim.keymap.set
-- Disable arrows in every mode
map("n", "<Up>", ":echoe 'Get off my lawn!'<CR>")
map("n", "<Down>", ":echoe 'Get off my lawn!'<CR>")
map("n", "<Left>", ":echoe 'Get off my lawn!'<CR>")
map("n", "<Right>", ":echoe 'Get off my lawn!'<CR>")
map("i", "<Up>", "<C-o>:echoe 'Get off my lawn!'<CR>")
map("i", "<Down>", "<C-o>:echoe 'Get off my lawn!'<CR>")
map("i", "<Left>", "<C-o>:echoe 'Get off my lawn!'<CR>")
@gim-
gim- / checkstyle.xml
Last active May 26, 2024 14:05
Collection of custom XPath CheckStyle rules
<!-- This is a collection of useful CheckStyle XPath rules -->
<!-- See https://checkstyle.sourceforge.io/checks/coding/matchxpath.html -->
<!-- Some useful rules can also be found in https://github.com/checkstyle/checkstyle/blob/master/config/checkstyle-checks.xml -->
<!-- Forbids usage of Collectors#toList in favour of Stream#toList -->
<module name="MatchXpath">
<property name="query" value="//METHOD_CALL[./DOT/IDENT[@text='collect'] and ..//METHOD_CALL//IDENT[@text='toList']]"/>
<message key="matchxpath.match" value="Use Stream#toList() method to collect items."/>
</module>
@gim-
gim- / revanced-patch.sh
Last active June 18, 2025 11:48
Script to patch an APK using ReVanced CLI tool
#!/bin/sh
# This script automatically pulls revanced-cli, and revanced-patches source code.
# Then builds them and runs revanced-cli with necessary dependencies for APK patching.
#
# Requirements: git, openjdk 11
#
# Usage: ./revanced-patch.sh your-app.apk
# You can also provide any additional options supported by revanced-cli
# See usage docs for more details https://github.com/ReVanced/revanced-cli/blob/main/docs/1_usage.md
@gim-
gim- / InstagramUnfollowScript.java
Last active June 16, 2025 16:58
Unfollows an account from all non-followers on Instagram. Java 8 or higher.
import org.brunocvcunha.instagram4j.Instagram4j;
import org.brunocvcunha.instagram4j.requests.InstagramGetUserFollowersRequest;
import org.brunocvcunha.instagram4j.requests.InstagramGetUserFollowingRequest;
import org.brunocvcunha.instagram4j.requests.InstagramUnfollowRequest;
import org.brunocvcunha.instagram4j.requests.payload.InstagramGetUserFollowersResult;
import org.brunocvcunha.instagram4j.requests.payload.InstagramUserSummary;
import java.io.IOException;
import java.util.List;
import java.util.Random;
@gim-
gim- / subdl.lua
Last active February 25, 2017 10:44 — forked from selsta/autosub.lua
Automatically download subtitles in mpv using subdl.
-- requires subdl: https://github.com/akexakex/subdl
-- default keybinding: b
-- add the following to your input.conf to change the default keybinding:
-- keyname script_binding subdl_load_subs
local utils = require 'mp.utils'
local subdl = "/usr/bin/subdl" -- use 'which subdl' to find the real path
function subdl_load()
mp.msg.info("Searching subtitles...")
mp.osd_message("Searching subtitles...")