Skip to content

Instantly share code, notes, and snippets.

@vicnaum
vicnaum / EVM_Regex_Decompiler.md
Created December 28, 2022 10:03
EVM Regex Decompiler
@fntlnz
fntlnz / self-signed-certificate-with-custom-ca.md
Last active April 19, 2024 12:30
Self Signed Certificate with Custom Root CA

Create Root CA (Done once)

Create Root Key

Attention: this is the key used to sign the certificate requests, anyone holding this can sign certificates on your behalf. So keep it in a safe place!

openssl genrsa -des3 -out rootCA.key 4096
@lelandbatey
lelandbatey / whiteboardCleaner.md
Last active April 25, 2024 02:01
Whiteboard Picture Cleaner - Shell one-liner/script to clean up and beautify photos of whiteboards!

Description

This simple script will take a picture of a whiteboard and use parts of the ImageMagick library with sane defaults to clean it up tremendously.

The script is here:

#!/bin/bash
convert "$1" -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 "$2"

Results

@sigbjod
sigbjod / HttpPipelineFactory.java
Last active February 1, 2018 08:46
My implementation of a Netty server handling HTTP requests
public class HttpPipelineFactory implements ChannelPipelineFactory {
private final ExecutionHandler executionHandler;
private final ProductDaoImpl productDao;
public HttpPipelineFactory(ProductDaoImpl productDao,
OrderedMemoryAwareThreadPoolExecutor eventExecutor) {
this.productDao = productDao;
this.executionHandler = new ExecutionHandler(eventExecutor);
}
@davetron5000
davetron5000 / Checkstyle pre-commit hook
Created December 18, 2008 02:40
Pre Commit Hook for running checkstyle on changed files
#!/usr/bin/perl
#
# Pre-commit hook for running checkstyle on changed Java sources
#
# To use this you need:
# 1. checkstyle's jar file somewhere
# 2. a checkstyle XML check file somewhere
# 3. To configure git:
# * git config --add checkstyle.jar <location of jar>
# * git config --add checkstyle.checkfile <location of checkfile>