Skip to content

Instantly share code, notes, and snippets.

@rHermes
rHermes / 2015-day4.cpp
Created November 15, 2021 21:55
Doing advent of code 2015 day 4 with https://github.com/intel/isa-l_crypto to try t oget it as fast as possibe
#include <string_view>
#include <cstdio>
#include <cstdlib>
#include <fmt/core.h>
#include <fmt/format.h>
#include <md5_mb.h>
#include <endian_helper.h>
@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)
{"id":"8819736634"}
{"id":"8819736636"}
{"id":"8819736637"}
{"id":"8819736638"}
{"id":"8819736639"}
{"id":"8819736640"}
{"id":"8819736642"}
{"id":"8819736644"}
{"id":"8819736648"}
{"id":"8819736651"}
package main
import (
"bufio"
"fmt"
"io"
"log"
"math/rand"
"net"
"net/http"
#define STB_IMAGE_IMPLEMENTATION
#include "stb_image.h"
#define STB_IMAGE_WRITE_IMPLEMENTATION
#include "stb_image_write.h"
int main() {
int x, y, n;
unsigned char *data = stbi_load("testimage.jpg", &x, &y, &n, 3);
; Created by rHermes (2017.03.14 12:36:40 UTC)
;
; This was made so that I could use the ingame code editor in the very cool
; game called "liberation-circut"[1]. It has only been minimally tested so
; please fork and share your improvements!
;
; [1] - [https://github.com/linleyh/liberation-circuit]
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
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:
#!/usr/bin/env python2
# Written by Alexogo and rHermes
print('Welcome to the QSL Login site, please enter your credentials.')
#TODO: Hash these passwords, as this could be read straight from memory.
logins = {
"QSL Alexogo": "Test01",
"QSL Viper": "Test02",
#!/usr/bin/env python2.7
# Written by rHermes
# Cross compapatebility:
try:
xrange
except NameError:
xrange = range
import struct
#!/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..."