Skip to content

Instantly share code, notes, and snippets.

View adamshaylor's full-sized avatar

Adam Shaylor adamshaylor

View GitHub Profile
@adamshaylor
adamshaylor / caesar-cipher-demo.ts
Created June 24, 2022 19:27
Caesar cipher demo
/**
* My kid shared his fascination with Caesar ciphers yesterday. He
* challenged me to decrypt one of his messages without the cipher
* offset. I tried to do it by hand, but it was surprisingly difficult
* for his short message. He made me promise not to use frequency
* analysis, but he never said anything about using a computer to brute
* force it!
*/
const validCharacters = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'] as const;
@transition from (.button:not(.button-depressed)) to (.button.button-depressed) {
background-color: red;
transition-delay: .2s;
transition-duration: .7s;
}
@transition from (.button.button-depressed) to (.button:not(.button-depressed)) {
background-color: black;
transition-duration: .2s;
}

Keybase proof

I hereby claim:

  • I am adamshaylor on github.
  • I am adamshaylor (https://keybase.io/adamshaylor) on keybase.
  • I have a public key whose fingerprint is 8CE3 E395 4B9D E681 971C 838C EE71 747C 8E5D BDA3

To claim this, I am signing this object: