Skip to content

Instantly share code, notes, and snippets.

View dbolkensteyn's full-sized avatar

Dinesh Bolkensteyn dbolkensteyn

View GitHub Profile
# Simple systemd service for Nebula Graph
# Enterprise Edition comes with this feature built-in
#
# Tested on Ubuntu LTS 20.04
#
# Increase max file descriptors for systemd child processes:
# 1. echo "DefaultLimitNOFILE=130000:524288" >> /etc/systemd/system.conf
# 2. Verify a process' limits: sudo prlimit -n <PID>
#
# Usage:
@dbolkensteyn
dbolkensteyn / covid-certificate-generator.py
Created September 16, 2021 09:19
Generates an (invalid) COVID-19 EU certificate
import base45
import cbor2
import zlib
from binascii import unhexlify
from cose.messages import Sign1Message
from cose.keys import CoseKey
# Specifications: https://ec.europa.eu/health/sites/default/files/ehealth/docs/covid-certificate_json_specification_en.pdf
@dbolkensteyn
dbolkensteyn / sroar.go
Created June 24, 2021 15:26
Potential issue with Maximum() on sroar
package main
import (
"fmt"
"github.com/RoaringBitmap/roaring"
"github.com/dgraph-io/sroar"
)
func main() {
@dbolkensteyn
dbolkensteyn / load-test.sh
Created August 16, 2018 11:20
Kubernetes load test
NAME=load-test
CMD="\
while true;
do
curl \
--silent \
${URL} > /dev/null;
echo downloaded;
done"
// Suggested rule: warn on casts from interfaces to concrete types
using System;
namespace VS2013ConsoleApplication1.RoslynRule_samples
{
public interface IMyInterface
{
void DoStuff();
}
// Suggested rule: warn on the use of "new" to hide methods
using System;
namespace VS2013ConsoleApplication1.RoslynRule_samples
{
public class MyBaseType
{
public int GetData()