Skip to content

Instantly share code, notes, and snippets.

View shakahl's full-sized avatar
:electron:

Soma Szelpal shakahl

:electron:
  • Mastermind at Shakahl Ltd. • Used to made GitLab's AutoDevOps possible on GitHub Actios at getbridge.com • Did modern DevOps scale-ups at DiNG.hu • nextearth.io • omgmobile.hu • used to worked on Jasmin at Docler
  • Warsaw, Poland
  • LinkedIn in/somaszelpal
  • X @szelpalsoma
  • Facebook szelpalsoma
  • Instagram szelpalsoma
View GitHub Profile
@shakahl
shakahl / FOR modifiers.md
Created February 25, 2025 17:47 — forked from Prince-Mandor/FOR modifiers.md
windows batch - FOR variables modifiers, ( AKA %~dp0 )

In addition, substitution of FOR variable references has been enhanced. You can now use the following optional syntax:

%~I         - expands %I removing any surrounding quotes (")
%~fI        - expands %I to a fully qualified path name
%~dI        - expands %I to a drive letter only
%~pI        - expands %I to a path only
%~nI        - expands %I to a file name only
%~xI        - expands %I to a file extension only
%~sI        - expanded path contains short names only

%~aI - expands %I to file attributes of file

@shakahl
shakahl / README.md
Created February 21, 2025 23:22 — forked from Artefact2/README.md
GGUF quantizations overview
@shakahl
shakahl / wrapper.cmd
Created February 12, 2025 23:12 — forked from mklement0/wrapper.cmd
wrapper.cmd - a wrapper batch-file template for executing embedded PowerShell and/or VBScript/JScript code
@echo off
setLocal enableDelayedExpansion
:: === ADAPTING THIS TEMPLATE (for help, see bottom or invoke with "help") ===
:: * Step 1 of 3: CLONE THIS BATCH FILE and give it a name of your choice.
:: * Step 2 of 3: Set the TARGET LANGUAGE on the next line.
:: One of: "ps1" "vbs" "js" (PowerShell, VBScript, JScript)
:: OR: "all" (runs ALL embedded snippets, in sequence)
:: NOTE: To add support for a new language, search for "NEW LANGUAGE"
:: below and follow the instructions there.
set "WRAPPER_LANG=ps1"
@shakahl
shakahl / prompts.csv
Created February 10, 2025 20:05 — forked from kevconklin/prompts.csv
Prompts
We can make this file beautiful and searchable if this error is corrected: Unclosed quoted field in line 5.
prompt_question
"Write a detailed essay on Dependency Injection. The essay should demonstrate your understanding of Dependency Injection, highlight its practical applications, and discuss the risks or challenges associated with Dependency Injection. Ensure your explanation is thorough and clear."
"Write a detailed essay on RESTful API Design. The essay should demonstrate your understanding of RESTful API Design, highlight its practical applications, and discuss the risks or challenges associated with RESTful API Design. Ensure your explanation is thorough and clear."
"Write a detailed essay on Event-Driven Architecture. The essay should demonstrate your understanding of Event-Driven Architecture, highlight its practical applications, and discuss the risks or challenges associated with Event-Driven Architecture. Ensure your explanation is thorough and clear."
"Write a detailed essay on Continuous Integration/Continuous Deployment (CI/CD). The essay should demonstrate your understanding of Continuous Integratio
@shakahl
shakahl / psql-with-gzip-cheatsheet.sh
Created January 7, 2025 16:50 — forked from brock/psql-with-gzip-cheatsheet.sh
Exporting and Importing Postgres Databases using gzip
# This is just a cheat sheet:
# On production
sudo -u postgres pg_dump database | gzip -9 > database.sql.gz
# On local
scp -C production:~/database.sql.gz
dropdb database && createdb database
gunzip < database.sql.gz | psql database
@shakahl
shakahl / rclone-cron.sh
Created January 5, 2025 02:57 — forked from jaredmales/rclone-cron.sh
An rclone backup script for cron
#!/bin/bash
##############################################################################
# An rclone backup script by Jared Males ([email protected])
#
# Copyright (C) 2018 Jared Males <[email protected]>
#
# This script is licensed under the terms of the MIT license.
# https://opensource.org/licenses/MIT
#
@shakahl
shakahl / README.md
Created December 30, 2024 16:12 — forked from stokito/README.md
CGI shell scripts samples

CGI samples

CGI Variables

Standard set of Common Gateway Interface environment variable are described in RFC3875. For example:

CONTENT_TYPE=application/x-www-form-urlencoded
GATEWAY_INTERFACE=CGI/1.1
REMOTE_ADDR=192.168.1.180
QUERY_STRING=Zbr=1234567&SrceMB=&ime=jhkjhlkh+klhlkjhlk+%A9%D0%C6%AE%C6%AE&prezime=&sektor=OP
REMOTE_PORT=2292
@shakahl
shakahl / get-win7-productkey.vbs
Created December 23, 2024 12:48 — forked from eyecatchup/get-win7-productkey.vbs
VBS Script to get the Windows(R) 7 Product Key from a PC's registry.
' VBS Script to get the Windows(R) 7 Product Key from a PC's registry.
'
' Save the VBScript as "getWin7Key.vbs" somewhere on your Windows7 PC.
' Now, when you double-click the local script file an alertbox pops up
' displaying the product key stored in the machine's Windows registry.
Set WshShell = WScript.CreateObject("WScript.Shell")
KeyPath = "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\DigitalProductId"
MsgBox ExtractKey(WshShell.RegRead(KeyPath))
@shakahl
shakahl / gitzip.sh
Created December 22, 2024 21:31 — forked from LeonardoCardoso/gitzip.sh
Zip folder ignoring files listed on .gitignore
#...
function gitzip() {
git archive -o $@.zip HEAD
}
#... gitzip ZIPPED_FILE_NAME
@shakahl
shakahl / container.rsc
Created December 10, 2024 12:03 — forked from bburky/container.rsc
Run the Tailscale Docker container on a Mikrotik router
# Run the Tailscale Docker container on a Mikrotik router
# Based on Mikrotik container documentation:
# https://help.mikrotik.com/docs/display/ROS/Container
# Tailscale container documentation:
# https://hub.docker.com/r/tailscale/tailscale
# Tested on an hAP AX^3 with RouterOS 7.7