Skip to content

Instantly share code, notes, and snippets.

View bynux-gh's full-sized avatar

Bryn ♫ bynux-gh

View GitHub Profile
@bynux-gh
bynux-gh / HexLib.scala
Created June 10, 2022 18:36
Scala program to translate between HEX and ASCII
// Program to encode/decode hexadecimal and ASCII/Unicode
/**
* Decodes a string of hexadecimal numbers into a string of characters.
*
* @param input A string with only valid HEX numbers separated by spaces and/or commas.
*/
def decodeHex(input: String): String = {
input
.split("(\\s|,)+") // Split into individual values

Keybase proof

I hereby claim:

  • I am digital-diplomat on github.
  • I am d1pl0mat (https://keybase.io/d1pl0mat) on keybase.
  • I have a public key whose fingerprint is BE68 45F6 02EA 82F2 4A81 EAE6 6D56 E565 881B DA42

To claim this, I am signing this object:

@bynux-gh
bynux-gh / HexLib.kt
Created March 8, 2023 02:13
Program to translate HEX and ASCII, rewritten in Kotlin
// Program to encode/decode hexadecimal and ASCII/Unicode
/**
* Decodes a string of hexadecimal numbers into a string of characters.
*
* @param input A string with only valid HEX numbers separated by spaces and/or commas.
*/
fun decodeHex(input: String): String {
return input
.split(Regex("(\\s|,)+")) // Split into individual values
@bynux-gh
bynux-gh / timer.c
Last active July 6, 2024 00:31
A basic timer application. Can be used alongside other terminal commands to give them a required countdown before executing.
/* CTimer - A dead-simple console timer by Bryn Miller.
*
* Recommended use case: `ctimer $TIME && other-command`
*/
#include <stdio.h>
#include <unistd.h>
#include <string.h>
int main(int argc, char** argv) {