Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env ruby
## Bot, sits in TB server and pings periodically to
## remain connected. Parses SAY strings for globals
require 'socket'
require 'digest/md5'
require 'io/wait'
def resolver(server)
puts "Trying to resolve #{server} to IP..."
def HMP(n):
x = 2
z = []
while x <= n//2:
while n % x == 0:
n //= x
z.append(x)
x += 1
if n is not 1:
@rHermes
rHermes / TrueColour.md
Created May 27, 2020 09:17 — forked from XVilka/TrueColour.md
True Colour (16 million colours) support in various terminal applications and terminals

Terminal Colors

There exists common confusion about terminal colors. This is what we have right now:

  • Plain ASCII
  • ANSI escape codes: 16 color codes with bold/italic and background
  • 256 color palette: 216 colors + 16 ANSI + 24 gray (colors are 24-bit)
  • 24-bit true color: "888" colors (aka 16 milion)