Skip to content

Instantly share code, notes, and snippets.

View Heziode's full-sized avatar
👨‍🎓
PhD student

Quentin Dauprat, PhD Heziode

👨‍🎓
PhD student
View GitHub Profile
@coolaj86
coolaj86 / posix-bsd-flags.md
Last active January 4, 2026 16:11
POSIX, BSD, GNU, & IEEE Standard Command Line Flags & Options

POSIX & BSD Standard Command Line Flags & Options

The vital resource for developers creating new command-line tools to learn the wisdom of the ancients.

All programs should universally implement these flags:

  • -V (uppercase), --version, version
  • --help, help (also the default if nothing is given)
  • -- stop processing flags; treat all else as raw arguments
@tkrotoff
tkrotoff / #calculator.ts
Last active October 1, 2025 13:29
Calculator function using shunting yard algorithm and reverse Polish notation (RPN)
// https://gist.github.com/tkrotoff/b0b1d39da340f5fc6c5e2a79a8b6cec0
// WTF!
// parseFloat('-0') => -0 vs parseFloat(-0) => 0
// -0 === 0 => true vs Object.is(-0, 0) => false
const minus0Hack = (value: number) => (Object.is(value, -0) ? '-0' : value);
export const operators: {
[operator: string]:
| {
@qoomon
qoomon / conventional-commits-cheatsheet.md
Last active January 7, 2026 15:51
Conventional Commits Cheatsheet
@fnky
fnky / ANSI.md
Last active January 7, 2026 17:03
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27
# stop active raid
mdadm --stop /dev/md[01]

# destroy partition table on hdds
dd if=/dev/zero of=/dev/sda bs=1M count=512
dd if=/dev/zero of=/dev/sdb bs=1M count=512
dd if=/dev/zero of=/dev/sdc bs=1M count=512
dd if=/dev/zero of=/dev/sdd bs=1M count=512
@CMCDragonkai
CMCDragonkai / regular_expression_engine_comparison.md
Last active November 21, 2025 01:30
Regular Expression Engine Comparison Chart

Regular Expression Engine Comparison Chart

Many different applications claim to support regular expressions. But what does that even mean?

Well there are lots of different regular expression engines, and they all have different feature sets and different time-space efficiencies.

The information here is just copied from: http://regular-expressions.mobi/refflavors.html

@keyvanakbary
keyvanakbary / httpurl.coffee
Last active February 4, 2021 10:16
Http URL regex based on RFC 1738
class HttpUrl
ALPHA = "[a-zA-Z]"
DIGIT = "[0-9]"
DIGITS = "#{DIGIT}+"
SAFE = "[-$_.+]"
EXTRA = "[!*'(),]"
ALPHADIGIT = "[a-zA-Z0-9]"
TOPLABEL = "#{ALPHA}(#{ALPHADIGIT}|-)*#{ALPHADIGIT}|#{ALPHA}"