Skip to content

Instantly share code, notes, and snippets.

View mvanbaak's full-sized avatar

Michiel van Baak Jansen mvanbaak

View GitHub Profile

Quick Tips for Fast Code on the JVM

I was talking to a coworker recently about general techniques that almost always form the core of any effort to write very fast, down-to-the-metal hot path code on the JVM, and they pointed out that there really isn't a particularly good place to go for this information. It occurred to me that, really, I had more or less picked up all of it by word of mouth and experience, and there just aren't any good reference sources on the topic. So… here's my word of mouth.

This is by no means a comprehensive gist. It's also important to understand that the techniques that I outline in here are not 100% absolute either. Performance on the JVM is an incredibly complicated subject, and while there are rules that almost always hold true, the "almost" remains very salient. Also, for many or even most applications, there will be other techniques that I'm not mentioning which will have a greater impact. JMH, Java Flight Recorder, and a good profiler are your very best friend! Mea

@sators
sators / connect.php
Last active April 11, 2024 07:17
PHP MySQLi Amazon Aurora RDS EC2 IAM Role Based Authentication
<?php
/********* CONFIG ********/
$clusterEndpoint = "";
$clusterPort = 3306;
$clusterRegion = "us-east-1";
$dbUsername = "";
$dbDatabase = "";
/*************************/
@EdOverflow
EdOverflow / github_bugbountyhunting.md
Last active April 20, 2024 01:36
My tips for finding security issues in GitHub projects.

GitHub for Bug Bounty Hunters

GitHub repositories can disclose all sorts of potentially valuable information for bug bounty hunters. The targets do not always have to be open source for there to be issues. Organization members and their open source projects can sometimes accidentally expose information that could be used against the target company. in this article I will give you a brief overview that should help you get started targeting GitHub repositories for vulnerabilities and for general recon.

Mass Cloning

You can just do your research on github.com, but I would suggest cloning all the target's repositories so that you can run your tests locally. I would highly recommend @mazen160's GitHubCloner. Just run the script and you should be good to go.

$ python githubcloner.py --org organization -o /tmp/output
@0xallie
0xallie / lossless-stream-rip-cheatsheet.md
Last active April 3, 2024 06:11
Lossless stream rip cheatsheet

Lossless stream rip cheatsheet

Note: This guide may be slightly outdated. It may be still useful for older releases, but nowadays the vast majority of releases are correctly tagged as WEB-DL (unless it's RARBG/rartv). Protip: prefer looking at file names instead of release names, as they tend to be more accurate.

This is a short cheatsheet to help you determine whether a release from Amazon, Hulu, or Netflix contains the lossless/untouched (as in no further loss of quality compared to what the streaming services provide) video/audio or not. Most newer P2P releases are correctly tagged, but for older releases, it cannot be reliably determined based on the tags alone.

In most cases, non-lossless rips from these services are screen captures (which, when done by professional releasers, should be high quality and contain little to no glitches – see the history section for details), but in some cases they may be simply reencoded from the untouched stream, for example to crop black bars or reencode from a

{
"AWSTemplateFormatVersion": "2010-09-09",
"Description": "AWS CloudFormation deploys a Windows machine used for Steam",
"Parameters": {
"AWSAMI": {
"Description": "Choose the AMI ID for your Steam machine. This should be a Windows Server 2012 R2 instance and the ID will look like ami-XXXXXXXX",
"Type": "AWS::EC2::Image::Id"
},
"AWSSubnet": {
"Description": "Choose a subnet for the Steam instance.",
@IntergalacticApps
IntergalacticApps / make_windows10_great_again.bat
Last active December 28, 2023 08:16
Make Windows 10 Great Again - stop Windows 10 spying!
@echo off
setlocal EnableDelayedExpansion
ver | find "10." > nul
if errorlevel 1 (
echo Your Windows version is not Windows 10... yet. Brace yourself, Windows 10 is coming^^!
pause
exit
)
@kissgyorgy
kissgyorgy / sqlalchemy_conftest.py
Last active March 5, 2024 23:05
Python: py.test fixture for SQLAlchemy test in a transaction, create tables only once!
from sqlalchemy import create_engine
from sqlalchemy.orm import Session
from myapp.models import BaseModel
import pytest
@pytest.fixture(scope="session")
def engine():
return create_engine("postgresql://localhost/test_database")
@nl5887
nl5887 / transfer.fish
Last active March 22, 2022 09:07
Bash and zsh alias for transfer.sh. Transfers files and directories to transfer.sh.
function transfer
if test (count $argv) -eq 0
echo "No arguments specified. Usage:\necho transfer /tmp/test.md\ncat /tmp/test.md | transfer test.md"
return 1
end
## get temporarily filename, output is written to this file show progress can be showed
set tmpfile ( mktemp -t transferXXX )
## upload stdin or file
@clemensg
clemensg / etc_make.conf
Last active June 1, 2020 21:37
My FreeBSD make.conf
# /etc/make.conf
# Clemens Gruber, 2017
#
# Nearby mirror
#MASTER_SITE_OVERRIDE="ftp://ftp.at.freebsd.org/pub/FreeBSD/ports/distfiles/"
#MASTER_SITE_OVERRIDE="ftp://ftp.de.freebsd.org/pub/FreeBSD/ports/distfiles/"
# Build
MAKE_JOBS_NUMBER?=8
@pascalpoitras
pascalpoitras / config.md
Last active April 8, 2024 18:58
My WeeChat configuration

WeeChat Screenshot

Mouse


enable