Skip to content

Instantly share code, notes, and snippets.

@neingeist
neingeist / elinkify.rb
Created November 3, 2023 22:08 — forked from lypanov/elinkify.rb
Post-process step using elinks -dump to create OSC-8 style hyperlinked terminal output
require "json"
require "pp"
state = false
references_raw, content = *(`elinks -dump /tmp/dump4`.lines.partition { |line| state = true if line == "References\n" ; state } )
content_began, delayed_link = false, nil
references = references_raw.inject({}) do |hsh, line|
if line =~ /Visible links$/
content_began = true
next hsh
@neingeist
neingeist / ANSI.md
Created September 1, 2023 15:59 — 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
@neingeist
neingeist / soup.io.sh
Created September 18, 2018 11:29
Script for downloading all images posted on a soup (soup.io)
#!/bin/bash
# Author: Mike Herwig
# Description: Script for downloading all images posted on a soup (soup.io)
#where to download from
HOST="neingeist.soup.io"
#this is the regex for matching the images, you might want to update it when soup.io changes their urls
REGEX="http://asset-[a-z0-9]{1}\.(soupcdn\.com|soup\.io)/asset/[0-9]{4}/[0-9]{4}_[a-z0-9]{4}(_[0-9]{2,3})?\.(jpeg|jpg|png|gif)"
@neingeist
neingeist / protocol-fix.txt
Created February 15, 2018 14:39 — forked from eculver/protocol-fix.txt
How to deal with tmux "protocol version mismatch"
$ tmux attach
protocol version mismatch (client 7, server 6)
$ pgrep tmux
3429
$ /proc/3429/exe attach