Skip to content

Instantly share code, notes, and snippets.

@fnky
fnky / ANSI.md
Last active May 18, 2025 13:00
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27
@wagenet
wagenet / glibc.md
Last active March 11, 2025 05:42
glibc Versions

glibc Versions

List of oldest supported version of top 10 Linux Distros and their glibc version according to distrowatch.com.

Summary

Out of all versions with published EOLs, 2.12 is the oldest glibc still active, found in CentOS 6.8.

If CentOS 6 and 7 are eliminated, the oldest glibc is 2.23 in Ubuntu and Slackware.

@fasterthanlime
fasterthanlime / glibc-check.sh
Last active January 8, 2025 20:46
Prints the various glibc versions required by an executable
#!/bin/bash
# This scripts lets you check which minimum GLIBC version an executable requires.
# Simply run './glibc-check.sh path/to/your/binary'
#
# You can set `MAX_VER` however low you want, although I (fasterthanlime)
# feel like `2.13` is a good target (For reference, Ubuntu 12.04 has GLIBC 2.15)
MAX_VER=2.13
SCRIPTPATH=$( cd $(dirname $0) ; pwd -P )
@tung
tung / check.py
Created December 25, 2011 07:31
Automated update script(s) for byuu's phoenix GUI meta-toolkit on Linux
#!/usr/bin/env python
# Print phoenix download URL if not already downloaded.
import urllib2
from BeautifulSoup import BeautifulSoup
import re
import glob
protocol = 'http'
@tung
tung / defername343.diff
Created April 12, 2011 03:20
Gist mirror of Michael Lehotay's TTY-only Defer Name v1.0 NetHack patch (see http://bilious.homelinux.org/?68).
diff -r -u nethack-3.4.3/src/allmain.c defername/src/allmain.c
--- nethack-3.4.3/src/allmain.c 2003-12-07 18:39:14.000000000 +0000
+++ defername/src/allmain.c 2003-12-14 18:58:28.000000000 +0000
@@ -450,6 +450,9 @@
void
display_gamewindows()
{
+ if(WIN_MESSAGE != WIN_ERR)
+ return;
+
@tung
tung / nh343-decgraphics-fix.diff
Created April 12, 2011 03:16
NetHack patch to fix the DECgraphics file option not working due to my own over-patching.
diff -U 3 -r nethack-3.4.3-pre-defername/sys/unix/unixmain.c nethack-3.4.3/sys/unix/unixmain.c
--- nethack-3.4.3-pre-defername/sys/unix/unixmain.c 2011-04-09 15:33:59.000000000 +1000
+++ nethack-3.4.3/sys/unix/unixmain.c 2011-04-11 00:39:42.000000000 +1000
@@ -160,6 +160,12 @@
#endif
/*
+ * Set DECgraphics again in case option loading didn't set it.
+ */
+ if(iflags.DECgraphics)
@tung
tung / nh343-defername-unix-tty.diff
Created April 12, 2011 03:11
Unix/TTY-specific NetHack patch to allow choosing a name after picking a role. Made because Michael Lehotay's patch (http://bilious.homelinux.org/?68) was unavailable, until yesterday.
diff -r -U 3 -x '*.o' -x nethack -x nhdat -x date.h vanilla/include/extern.h nethack-3.4.3/include/extern.h
--- vanilla/include/extern.h 2011-04-09 00:08:56.000000000 +1000
+++ nethack-3.4.3/include/extern.h 2011-04-12 03:28:47.000000000 +1000
@@ -638,6 +638,7 @@
E int NDECL(open_savefile);
E int NDECL(delete_savefile);
E int NDECL(restore_saved_game);
+E int NDECL(saved_game_exists);
E void FDECL(compress, (const char *));
E void FDECL(uncompress, (const char *));