This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import hashlib | |
import json | |
import logging | |
import logging.handlers | |
import os | |
import shutil | |
import sys | |
import tempfile | |
import urllib |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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 | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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 |
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import lxml.html | |
import urllib.request | |
from pathlib import Path | |
import requests | |
telegram_bot_token = "FIXME" | |
telegram_group_name = "@kvetinac" |