Skip to content

Instantly share code, notes, and snippets.

View balazsbohonyi's full-sized avatar

Bohonyi Balazs - Zsolt balazsbohonyi

View GitHub Profile
@balazsbohonyi
balazsbohonyi / businessDays.js
Created August 8, 2013 18:55
Adding/Subtracting Business Days in Javascript (extends the native Date Javascript object)
Number.prototype.mod = function(n) {
return ((this%n)+n)%n;
}
// support for adding/subtracting business days for Javascript dates
Date.prototype.addBusinessDays = function(days) {
days = parseInt(days);
var wks = Math.floor(days/5);
var dys = days.mod(5);
var dy = this.getDay();

I need to geotag every photo from trip to .gpx track, but GPX Logger accidentaly stopped. Luckly, i has turned on Google location history.

  1. Takeout location history from google.
  2. Extract .json file
  3. trigger the following commands
git clone https://github.com/Scarygami/location-history-json-converter.git

py location-history-json-converter-master/location_history_json_converter.py -f gpx -s 2017-05-06 -e 2017-05-07 "Takeout/Location History/Records.json" "Takeout/Location History/Records.gpx"
@balazsbohonyi
balazsbohonyi / node_create_a_redirect_server.md
Last active July 19, 2025 17:28 — forked from leommoore/node_create_a_redirect_server.md
Create a redirect server in Node.js

Create a redirect server in Node.js

'use strict'

var http = require('http');

var mappings = {
 g: 'http://www.google.com'
@balazsbohonyi
balazsbohonyi / readme.md
Last active March 29, 2024 01:16
The best Windows utility for Win11
@balazsbohonyi
balazsbohonyi / readme.md
Last active April 9, 2024 22:33
'more' in Git Bash

Add an alias for more in .bashrc:

alias more=/proc/cygdrive/c/Windows/System32/more.com

...and then you can use it like this in Git Bash:

cat large_file | more

To increase less's screen width in Git Bash, try this: git config --global core.pager "env -u COLUMNS less"

@balazsbohonyi
balazsbohonyi / jetbrains_trial_reset.py
Created July 19, 2025 18:10
Jetbeans Trials reset
#!/usr/bin/env python3
"""
JetBrains Trial Reset Tool
A Python implementation that resets trial periods for JetBrains IDEs
"""
import os
import platform
import subprocess
import shutil
@balazsbohonyi
balazsbohonyi / README.md
Created January 22, 2026 20:16
Antigravity rules - Opus-style permission-gated workflow

Source: Reddit Pastebin

How to add rules in Antigravity

  • Open any Antigravity agent chat, click the three-dot menu in the top‑right.
  • Choose Customizations → in the Rules tab click [+ Workflow].
  • Specify as rule name: opus_permission_gated_v1
  • Antigravity will create the .agent/rules/opus_permission_gated_v1 markdown file in the project's root..
@balazsbohonyi
balazsbohonyi / zai-setup.md
Last active March 7, 2026 17:13
Setting up Z.AI GLM-4.7 with Claude Code

1. Wrapper Script: ~/.claude/claude-zai.sh

#!/bin/bash
export ANTHROPIC_BASE_URL="https://api.z.ai/api/anthropic"
export ANTHROPIC_AUTH_TOKEN="$ZAI_API_KEY"
export API_TIMEOUT_MS="3000000"
export ANTHROPIC_DEFAULT_HAIKU_MODEL="glm-4.7-flash"
export ANTHROPIC_DEFAULT_SONNET_MODEL="glm-4.7"
export ANTHROPIC_DEFAULT_OPUS_MODEL="glm-4.7"
exec claude "$@"
@balazsbohonyi
balazsbohonyi / llm-wiki.md
Last active April 11, 2026 20:28 — forked from karpathy/llm-wiki.md
llm-wiki

LLM Wiki

A pattern for building personal knowledge bases using LLMs.

This is an idea file, it is designed to be copy pasted to your own LLM Agent (e.g. OpenAI Codex, Claude Code, OpenCode / Pi, or etc.). Its goal is to communicate the high level idea, but your agent will build out the specifics in collaboration with you.

The core idea

Most people's experience with LLMs and documents looks like RAG: you upload a collection of files, the LLM retrieves relevant chunks at query time, and generates an answer. This works, but the LLM is rediscovering knowledge from scratch on every question. There's no accumulation. Ask a subtle question that requires synthesizing five documents, and the LLM has to find and piece together the relevant fragments every time. Nothing is built up. NotebookLM, ChatGPT file uploads, and most RAG systems work this way.