Skip to content

Instantly share code, notes, and snippets.

@shenhuang
shenhuang / decrypt.jl
Last active September 5, 2022 15:53
Julia code for Caesar shift and columnar transposition cracking.
cipherText = "KUHPVIBQKVOSHWHXBPOFUXHRPVLLDDWVOSKWPREDDVVIDWQRBHBGLLBBPKQUNRVOHQEIRLWOKKRDD"
println("Begin to decrypt cipher text: ", cipherText)
#https://en.wikipedia.org/wiki/Letter_frequency
frequencies = Dict( "A" => 8.167,
"B" => 1.492,
"C" => 2.782,
"D" => 4.253,
"E" => 12.702,
@shenhuang
shenhuang / lantermap.js
Last active February 17, 2019 19:11
A word map for the Lantern Demo.
const ltrMap = [];
ltrMap[" "] = [
[0, 0, 0, 0, 0],
[0, 0, 0, 0, 0],
[0, 0, 0, 0, 0],
[0, 0, 0, 0, 0],
[0, 0, 0, 0, 0],
[0, 0, 0, 0, 0],
[0, 0, 0, 0, 0],
];
@shenhuang
shenhuang / heartdemo.html
Last active April 15, 2022 22:13
Celebrate Valentines Day with this demo where holding the mouse key leaves a trail of hearts...
<!--Copyright to Shen Huang, you can reach me out at shenhuang@live.ca-->
<!DOCTYPE html>
<meta name = "viewport" content = "width = device-width, initial-scale = 1.0">
<html>
<head>
<title>HEART DEMO</title>
<style>
body {
background-color : #ffceed;
@shenhuang
shenhuang / bubbledemo.html
Last active February 12, 2019 15:52
A beach themed website where dragging your mouse will leave a trial of bubbles.
<!--Copyright to Shen Huang, you can reach me out at shenhuang@live.ca-->
<!DOCTYPE html>
<meta name = "viewport" content = "width = device-width, initial-scale = 1.0">
<html>
<head>
<title>BUBBLE DEMO</title>
<style>
body {
background-color : #a3d2ff;
@shenhuang
shenhuang / beach.html
Created February 9, 2019 23:22
A CSS beach theme scales dynamically...
<!--Copyright to Shen Huang, you can reach me out at shenhuang@live.ca-->
<!DOCTYPE html>
<meta name = "viewport" content = "width = device-width, initial-scale = 1.0">
<html>
<head>
<title>BEACH</title>
<style>
body {
background-color : #a3d2ff;
@shenhuang
shenhuang / fireworkdemo.html
Last active February 6, 2019 20:14
A firework which you can easily embed into your browser...
<!--Copyright to Shen Huang, you can reach me out at shenhuang@live.ca-->
<!DOCTYPE html>
<meta name = "viewport" content = "width = device-width, initial-scale = 1.0">
<html>
<head>
<title>FIREWORK DEMO</title>
<style>
body {
background-color : #001126;