Skip to content

Instantly share code, notes, and snippets.

View KristobalJunta's full-sized avatar
🇺🇦
Enduring & prevailing

Eugene KristobalJunta

🇺🇦
Enduring & prevailing
View GitHub Profile
@KristobalJunta
KristobalJunta / autoexec.cfg
Created May 21, 2026 23:11
ioquake3 config
# sources:
# 1. https://gist.github.com/oliveratgithub/b2df8ff2a76d1ff406f033701de66628
# 2. https://gist.github.com/ZerTerO/384a6c324187e443107a1c8caeb644b8
bind e "weapon 6"
bind f "+button2"
bind g "weapon 9"
bind q "weapon 5"
bind r "weapon 7"
bind x "weapon 8"
@KristobalJunta
KristobalJunta / zoom_repack.sh
Created August 2, 2024 14:27
Fix Zoom deb package: remove ibus from dependencies
#!/bin/sh
# Remove ibus from zoom .deb dependencies
# From https://unix.stackexchange.com/a/705250
set -xe
# tmp=$(mktemp -d)
# cd "${tmp}"
# name='zoom.deb'
@KristobalJunta
KristobalJunta / .celery timezones.md
Last active June 21, 2022 15:29
Example for Celery 4.4.0 with timezoned beat task

Example for timezoned beat task with Celery 4.4.0. Two ways to create datetime object inside crontab's nowfun that seemingly produce same result actually behave differentlty.

const dino = `
__
/ _)
_.----._/ /
/ /
__/ ( | ( |
/__.-'|_|--|_|
`
console.log(dino)
@KristobalJunta
KristobalJunta / progress.py
Created February 18, 2022 09:38
Simple progress indicator in python (string rewrites itself)
from time import sleep
n = 10
for i in range(n + 1):
print(f"\rsleeping ... {i} / {n}", end="\r")
sleep(.5)
print()
@KristobalJunta
KristobalJunta / split_csv.py
Created June 1, 2021 14:57
Fast (probably) splitting of csv files by number of rows (accounts for linebreaks inside cell values)
#!/usr/bin/env python2
import os
import sys
def split(filehandler, delimiter=',', row_limit=700000,
output_name_template='output_%s.csv', output_path='.', keep_headers=True):
import csv
reader = csv.reader(filehandler, delimiter=delimiter)
current_piece = 1
@KristobalJunta
KristobalJunta / heididecode.py
Last active October 29, 2019 10:05
Decode passwords stored in HeidiSQL
#!/usr/bin/env python
from __future__ import print_function
import sys
def heidi_decode(hexstr):
shift = int(hexstr[-1])
l = [int(hexstr[i:i+2], 16) for i in range(0, len(hexstr), 2)]
return ''.join(chr(v - shift) for v in l)
@KristobalJunta
KristobalJunta / JSONSerializable.py
Created August 27, 2019 20:12
A dict-serializable (JSON compatible) mixin for SQLAlchemy models
# -*- coding: utf-8 -*-
class JSONSerializable:
def _serialize(self, value):
if type(value) not in (int, float, bool, type(None)):
return str(value)
return value
def as_dict(self):
@KristobalJunta
KristobalJunta / carbon-config.json
Created July 9, 2019 18:28
My config for carbon.now.sh
{
"paddingVertical": "6px",
"paddingHorizontal": "9px",
"marginVertical": "45px",
"marginHorizontal": "45px",
"backgroundImage": null,
"backgroundImageSelection": null,
"backgroundMode": "color",
"backgroundColor": "rgba(255,255,255,1)",
"dropShadow": true,