Skip to content

Instantly share code, notes, and snippets.

View KleaTech's full-sized avatar

Adam Bozzay KleaTech

View GitHub Profile
@KleaTech
KleaTech / imageTool.html
Created August 7, 2026 14:07
Image tool - Print images in a grid
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<title>Image Grid for Print (with Drag & Drop)</title>
<style>
body {
font-family: sans-serif;
padding: 1rem;
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE keyboard PUBLIC "" "file://localhost/System/Library/DTDs/KeyboardLayout.dtd">
<!--Last edited by Ukelele version 2.2.8 on 2015-07-26 at 00:47 (BST)-->
<!---->
<keyboard group="29" id="30763" name="Lofasz" maxout="1">
<layouts>
<layout first="0" last="0" modifiers="30" mapSet="138"/>
</layouts>
<modifierMap id="30" defaultIndex="0">
<keyMapSelect mapIndex="0">
@KleaTech
KleaTech / anylog.js
Created July 23, 2026 09:57
A REST service for logging - useful when the application has no easy way to log messages
var express = require('express')
var cors = require('cors')
var app = express()
app.use(cors())
app.use(express.text());
app.post('/', function (req, res) {
console.log(req.body);
console.log();
@KleaTech
KleaTech / kocsonya.md
Created January 29, 2026 19:00
Kocsonya recept

Kocsonya recept

Hagyományos, sima, fokhagymás változat

Ezzel ellentétben az egy másik irányzat, ami gyakorlatilag egy direkt kocsonyásra főzött komplett húsleves, mindenféle zöldségekkel a sárgarépától a zellerig (sőt még főtt tojást is lehet bele tenni).

Hozzávalók

A hozzávalók mennyiségéhez azt veszem alapul, amennyi vizet fogok a lábasba tölteni, ehhez igazítom a többi összetevő mennyiségét. Így a szükséges mennyiséghez ezt csak fel kell szorozni.

Literenként:

@KleaTech
KleaTech / createPseudoObject.js
Created May 14, 2025 12:41
Arbitrary object methods and properties in JavaScript
function createPseudoObject() {
return new Proxy(new Function(), { get() { return createPseudoObject() } })
}
type ExtendSubtype<Type, Subtype, NewProps> = {
[K in keyof Type]: Type[K] extends Subtype
? Type[K] & NewProps
: Type[K] extends object
? ExtendSubtype<Type[K], Subtype, NewProps>
: Type[K];
};
@KleaTech
KleaTech / commands.ts
Created July 24, 2024 13:01
Cypress custom command similar to .then() but with retry-ability
declare global {
namespace Cypress {
interface Chainable<Subject> {
/**
* Custom command similar to cy.then() but with retry-ability
* @example cy.get('@jsonString').transformValue(JSON.parse).should('deep.equal', expectedValue)
* Note: If a .should() assertion is successful, the retry chain is stopped.
* So eg. cy.get('@jsonString').should('exist').transformValue(JSON.parse) will not query the jsonString again once it exists.
*/
transformValue<T>(transformFn: (subject: Subject) => T): Chainable<T>;
@KleaTech
KleaTech / .zshrc
Created March 28, 2024 09:01
Macos .zshrc file
alias cmd='open -a Terminal "`pwd`"'
npr() { npm run $@ }
export PATH="/opt/homebrew/bin:$PATH"
clear() { printf '\33c\e[3J' }
export PATH="/opt/homebrew/opt/openjdk@11/bin:$PATH"
gitPruneBranches() { git fetch -p && for branch in $(git for-each-ref --format '%(refname) %(upstream:track)' refs/heads | awk '$2 == "[gone]" {sub("refs/heads/", "", $1); print $1}'); do git branch -D $branch; done }
gitMergeMain() { git rev-parse --abbrev-ref HEAD | read currentBranch && git checkout main && git pull && git checkout $currentBranch && git merge main -m "merge
main" }
gitCheckoutUnderMain() { git add . && git stash && git checkout main && git stash pop && git checkout -b $1 }
@KleaTech
KleaTech / gist:232a3a32b9415d18bf35087843d961a0
Created January 3, 2024 09:01
Cypress process_profiler parser regex
\[32;1mcypress:server:util:process_profiler[^│]*│[^│]*│\W*'TOTAL'\W*│[^│]*│[^│]*│[^│]*│[^│]*│\W*([\d\.]*)\W*│\W*([\d\.]*)\W*│\W*([\d\.]*).*$
@KleaTech
KleaTech / gist:a2b4e345d00ad404beae53ed7d040eb5
Last active December 26, 2023 16:40
Worst computer bugs
British Post Office scandal https://www.youtube.com/watch?v=hCdI3UfQ1L4
Therac-25 https://www.youtube.com/watch?v=Ap0orGCiou8
ethiopian airlines flight 645 https://www.youtube.com/watch?v=lpJjWzCbsAc