Skip to content

Instantly share code, notes, and snippets.

@paulgregg
paulgregg / ANSI.md
Created October 18, 2024 12:08 — forked from fnky/ANSI.md
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27
@paulgregg
paulgregg / README.md
Last active July 7, 2024 03:29
Converting a gitlab export to simple git repo
@paulgregg
paulgregg / dirsunique.pl
Created October 26, 2014 13:15
Extract unique subdirectories from a file, ignoring parent dirs
#!/usr/bin/perl
# [email protected]
use Data::Dumper;
my $d={};
while(<STDIN>) {
chomp;
next if(/^$/);
@bits = split(/\//, $_);
$last = pop(@bits);
$dr = $d;