Skip to content

Instantly share code, notes, and snippets.

View DarkEye123's full-sized avatar
🏠
Working from home

Matej Leško DarkEye123

🏠
Working from home
View GitHub Profile
@DarkEye123
DarkEye123 / hacker-evolution-checksum.hs
Created November 6, 2022 19:45 — forked from stbuehler/hacker-evolution-checksum.hs
hacker evolution safegame checksum calculation
-- take all numbers from the 3rd until the second last line, multiply each
-- number with the associated multiplier from the list [10,5,6,7,8,9,11,13,14,15,16,2,3,17,18,19]
-- and sum everything up (modulo Int32) to get the checksum.
-- (hint: line 11, the 9th number in the list, is the cash amount)
-- in haskell:
import Data.Int
checksum :: [Int32] -> Int32
checksum nums = sum $ zipWith (*) nums [10,5,6,7,8,9,11,13,14,15,16,2,3,17,18,19]
@DarkEye123
DarkEye123 / consoleColors.js
Created October 23, 2020 19:21 — forked from abritinthebay/consoleColors.js
The various escape codes you can use to color output to StdOut from Node JS
// Colors reference
// You can use the following as so:
// console.log(colorCode, data);
// console.log(`${colorCode}some colorful text string${resetCode} rest of string in normal color`);
//
// ... and so on.
export const reset = "\x1b[0m"
export const bright = "\x1b[1m"
export const dim = "\x1b[2m"

Keybase proof

I hereby claim:

  • I am darkeye123 on github.
  • I am darkeye (https://keybase.io/darkeye) on keybase.
  • I have a public key ASA6IV_7l1MSR1UhsSSKTAiQjAVVV_iHI-kRFMTf5M1rPQo

To claim this, I am signing this object: