Skip to content

Instantly share code, notes, and snippets.

View dariotilgner's full-sized avatar
:octocat:

Dario Tilgner dariotilgner

:octocat:
View GitHub Profile
@dariotilgner
dariotilgner / testHashing.php
Created December 8, 2021 21:13
Simple benchmark for file hashes
<?php
// 2011542944 Dec 8 21:58 bigcsvfile.csv
$fileName = '/home/users/dtilgner/bigcsvfile.csv';
echo 'Performance benchmark (2 GB csv file) => md5_file(...) // hash_file("md5", ...) // hash_file("crc32", ...) // shell_exec("md5sum ...")' . PHP_EOL;
$md5FileTimes = [];
$hashFileMd5Times = [];
$hashFileCrc32Times = [];
@dariotilgner
dariotilgner / commitstats.sh
Last active August 11, 2023 04:27
Git Commit Stats
#!/bin/bash
FILTER_VALUE=${1:-0}
SUSPICIOUS_THRESHOLD=${2:-20}
GITHUB_REPO_URL="${GITHUB_REPO_URL:-https://github.com/DUMMY-USER/DUMMY-REPO}"
display_help() {
echo "Usage: $0 [FILTER_VALUE] [SUSPICIOUS_THRESHOLD]"