Skip to content

Instantly share code, notes, and snippets.

@AoJ
AoJ / conda-repo-clone
Created June 24, 2021 10:28 — forked from kalefranz/conda-repo-clone
Conda Repo Clone
#!/usr/bin/env python
import hashlib
import json
import logging
import logging.handlers
import os
import shutil
import sys
import tempfile
import urllib
@AoJ
AoJ / Digital-Green-Certificate-Dump.py
Created June 2, 2021 10:24 — forked from zajdee/Digital-Green-Certificate-Dump.py
A simple tool to dump the European Union's COVID passports (Digital Green Certificates)
#!/usr/bin/env python3
# install dependencies:
# pip install base45 cbor2 (cwt - not used here)
import sys
import zlib
from base45 import b45decode
from cbor2 import loads
package org.apache.spark.countSerDe
import org.apache.spark.sql.catalyst.util._
import org.apache.spark.sql.types._
import org.apache.spark.sql.Row
import org.apache.spark.sql.catalyst.InternalRow
import org.apache.spark.sql.catalyst.expressions.GenericInternalRow
import org.apache.spark.sql.expressions.MutableAggregationBuffer
import org.apache.spark.sql.expressions.UserDefinedAggregateFunction
@AoJ
AoJ / benchmark.zig
Created February 6, 2021 17:03 — forked from lithdew/benchmark.zig
zig: open-addressing robinhood hashmap w/ backward shift deletion
// zig run benchmark.zig -lc -O ReleaseFast
const std = @import("std");
usingnamespace @import("hashmap.zig");
pub fn main() !void {
const allocator = std.heap.c_allocator;
var map = try HashMap(
@AoJ
AoJ / patch-CVE-2020-15227.php
Created October 19, 2020 20:50 — forked from dg/patch-CVE-2020-15227.php
CVE-2020-15227 nette/application RCE in-place patch
<?php
# In-place apply the CVE-2020-15227 nette/application patch
# This is a universal patcher for all affected versions.
# Run with `php patch-CVE-2020-15227.php`
# Inspiration: @spazef0rze
@AoJ
AoJ / hash_comp.groovy
Created October 12, 2020 09:48 — forked from scoroberts/hash_comp.groovy
Test of different Java based SHA-256 hash implementations
@Grab(group='com.google.guava', module='guava', version='19.0')
@Grab(group='commons-codec', module='commons-codec', version='1.13')
@Grab(group='bouncycastle', module='bcprov-jdk15', version='140')
import groovy.transform.CompileStatic
import java.security.MessageDigest
import java.nio.charset.StandardCharsets
import com.google.common.hash.Hashing
import org.apache.commons.codec.digest.DigestUtils
import org.bouncycastle.crypto.digests.SHA256Digest
@AoJ
AoJ / HAclustering.md
Created June 17, 2020 09:30
High Availability (HA) and Clustering: 2-Node (Master / Slave) PostgreSQL Cluster
@AoJ
AoJ / README.md
Created May 14, 2020 09:09 — forked from nrocco/README.md
Alpine Playground with libvirt

First download alpine-make-vm-image from https://github.com/alpinelinux/alpine-make-vm-image

wget https://raw.githubusercontent.com/alpinelinux/alpine-make-vm-image/v0.4.0/alpine-make-vm-image \
    && echo '5fb3270e0d665e51b908e1755b40e9c9156917c0  alpine-make-vm-image' | sha1sum -c \
    || exit 1
mv alpine-make-vm-image /usr/local/bin/
chmod +x /usr/local/bin/alpine-make-vm-image

Create a new alpine qcow2 image

@AoJ
AoJ / happykaktus.py
Created February 24, 2020 15:27 — forked from oskar456/happykaktus.py
Scrap mujkaktus.cz and send news to a Telegram channel
#!/usr/bin/env python3
import lxml.html
import urllib.request
from pathlib import Path
import requests
telegram_bot_token = "FIXME"
telegram_group_name = "@kvetinac"