Skip to content

Instantly share code, notes, and snippets.

View D3vl0per's full-sized avatar

Márk Zsibók (D3v) D3vl0per

View GitHub Profile
@stenuto
stenuto / hls.sh
Created November 7, 2024 16:58
HLS ffmpeg script
#!/bin/bash
# Function to display usage information
usage() {
echo "Usage: $0 /path/to/input.mp4 [ /path/to/output_directory ]"
exit 1
}
# Check if at least one argument (input file) is provided
if [ $# -lt 1 ]; then
@awjian
awjian / gist:55c422bd0c0d1d8fff690d7df49c418b
Last active November 13, 2024 14:55
beyond-the-search-bar-examples
// The Search Bar (name, description, synonyms, campaign)
https://search-playground.mongodb.com/tools/code-playground/snapshots/671a6986de97729370b8aceb
// Facets and Filtering
1. Facets (size, type): https://search-playground.mongodb.com/tools/code-playground/snapshots/671a69624b393da1cfa88572
2. Filtering (size, type): https://search-playground.mongodb.com/tools/code-playground/snapshots/671a694a4b393da1cfa88570
// Sorting (Price)
https://search-playground.mongodb.com/tools/code-playground/snapshots/671a69bfde97729370b8aced
@c0m4r
c0m4r / void_linux_hetzner_arm_ipv6.md
Last active June 13, 2025 15:03
Void Linux installation on Hetzner Cloud VPS (Arm64/IPv6-only)

Void Linux installation on Hetzner Cloud VPS

(Arm64/IPv6-only)

This guide describes how to install Void Linux on ARM Hetzner Cloud instances with IPv6-only setup.

image

Table of contents:

@flrdv
flrdv / gist:395a15a982cda3e43dc4f4833d3b2aac
Created October 9, 2023 12:16
Flate compressor comparing benchmarks
cpu: AMD Ryzen 7 5700X 8-Core Processor
Before patches:
BenchmarkDecodeDigitsSpeed1e4-16 32365 36650 ns/op 272.85 MB/s 81 B/op 3 allocs/op
BenchmarkDecodeDigitsSpeed1e5-16 3474 346724 ns/op 288.41 MB/s 106 B/op 4 allocs/op
BenchmarkDecodeDigitsSpeed1e6-16 332 3576404 ns/op 279.61 MB/s 435 B/op 18 allocs/op
BenchmarkDecodeDigitsDefault1e4-16 36774 32550 ns/op 307.22 MB/s 81 B/op 3 allocs/op
BenchmarkDecodeDigitsDefault1e5-16 2996 388516 ns/op 257.39 MB/s 92 B/op 3 allocs/op
BenchmarkDecodeDigitsDefault1e6-16 308 3847923 ns/op 259.88 MB/s 221 B/op 4 allocs/op
@yorickdowne
yorickdowne / HallOfBlame.md
Last active November 22, 2025 10:06
Great and less great SSDs for Ethereum nodes

Overview

Syncing an Ethereum node is largely reliant on latency and IOPS, I/O Per Second, of the storage. Budget SSDs will struggle to an extent, and some won't be able to sync at all. IOPS can roughly be used as proxy of / predictor for latency. Measuring latency directly is arguably better.

This document aims to snapshot some known good and known bad models.

The drive lists are ordered by interface and then by capacity and alphabetically by vendor name, not by preference. The lists are not exhaustive at all. @mwpastore linked a filterable spreadsheet in comments that has a far greater variety of drives and their characteristics. Filter it by DRAM yes, NAND Type TLC, Form Factor M.2, and desired capacity.

For size, 4TB is a conservative choice which also supports a Fusaka "supernode". The smaller 2TB drive should last an Ethereum full node until at least sometime 2026, with [pre-merge history expiry](http

@yorickdowne
yorickdowne / TRIMmed.md
Last active September 1, 2024 17:45
Move Dell server from hardware RAID to software RAID

Overview

I was looking after a Dell PowerEdge R420 server with a hardware RAID card in it, a PERC8 H710P Mini. Connected to this were two WD Blue 3D NAND SATA SSDs in RAID-1, that were handling a write-intensive database: Geth, in this case.

After 11 months of running without problems, I had reason to "resync" Geth, and the server could not keep up with the required IOPS. Symptoms were Database compacting, degraded performance messages for hours, without recovery, and read/write latency in excess of 20/70ms, as measured by sudo iostat -mdx and its r_await and w_await data.

The cause of this was that the RAID controller does not support TRIM on the SSD, and the SSD's performance degraded over time because of it.

@chrisdlangton
chrisdlangton / hmac_decorator.py
Last active May 2, 2024 03:03
Time-based HMAC signature SHA256, SHA512, SHA3-256, SHA3-384, SHA3-512, and BLAKE2 for Python Flask with Javascript Forge.js and Bash/OpenSSL/Curl clients
import hashlib
import hmac
from base64 import b64encode
from functools import wraps
from datetime import datetime, timedelta
from flask import request, abort
from flask_login import login_user
from models import User, ApiKey
def require_hmac(not_before_seconds: int = 3, expire_after_seconds: int = 3):
@rmcdongit
rmcdongit / macOS_SytemPrefs.md
Last active December 8, 2025 06:24
Apple System Preferences URL Schemes

macOS 10.15 System Preference Panes

Below are a list of System Preference pane URLs and paths that can be accessed with scripting to assist users with enabling macOS security settings without having to walk them through launching System Preferences, finding panes, and scrolling to settings. Not all panes have an accessible anchor and some are OS specific.

To find the Pane ID of a specific pane, open the System Preferences app and select the desired Preference Pane. With the pane selected, open the ScriptEditor.app and run the following script to copy the current Pane ID to your clipboard and display any available anchors:

tell application "System Preferences"
	set CurrentPane to the id of the current pane
	set the clipboard to CurrentPane
@goodwill
goodwill / cloud-sql-proxy.service
Last active September 27, 2024 11:20
Example Systemd file for starting cloud sql proxy at system start
[Install]
WantedBy=multi-user.target
[Unit]
Description=Google Cloud Compute Engine SQL Proxy
Requires=networking.service
After=networking.service
[Service]
Type=simple
# All scripts
```
--tamper=apostrophemask,apostrophenullencode,appendnullbyte,base64encode,between,bluecoat,chardoubleencode,charencode,charunicodeencode,concat2concatws,equaltolike,greatest,halfversionedmorekeywords,ifnull2ifisnull,modsecurityversioned,modsecurityzeroversioned,multiplespaces,nonrecursivereplacement,percentage,randomcase,randomcomments,securesphere,space2comment,space2dash,space2hash,space2morehash,space2mssqlblank,space2mssqlhash,space2mysqlblank,space2mysqldash,space2plus,space2randomblank,sp_password,unionalltounion,unmagicquotes,versionedkeywords,versionedmorekeywords
```
# General scripts
```
--tamper=apostrophemask,apostrophenullencode,base64encode,between,chardoubleencode,charencode,charunicodeencode,equaltolike,greatest,ifnull2ifisnull,multiplespaces,nonrecursivereplacement,percentage,randomcase,securesphere,space2comment,space2plus,space2randomblank,unionalltounion,unmagicquotes
```
# Microsoft access
```