diff --git a/Escape/index.html b/Escape/index.html new file mode 100644 index 0000000..9ac4c83 --- /dev/null +++ b/Escape/index.html @@ -0,0 +1,15 @@ + + + + + + + This is hell + + +
+
+
+ + + diff --git a/Escape/script.js b/Escape/script.js new file mode 100644 index 0000000..119a1a2 --- /dev/null +++ b/Escape/script.js @@ -0,0 +1,153 @@ +var TerminalEmulator = { + init: function (screen) { + var inst = Object.create(this); + inst.screen = screen; + inst.createInput(); + + return inst; + }, + + createInput: function () { + var inputField = document.createElement("div"); + var inputWrap = document.createElement("div"); + + inputField.className = "terminal_emulator__field"; + inputField.innerHTML = ""; + inputWrap.appendChild(inputField); + this.screen.appendChild(inputWrap); + this.field = inputField; + this.fieldwrap = inputWrap; + }, + + enterInput: function (input) { + return new Promise((resolve, reject) => { + var randomSpeed = (max, min) => { + return Math.random() * (max - min) + min; + }; + + var speed = randomSpeed(70, 90); + var i = 0; + var str = ""; + var type = () => { + str = str + input[i]; + this.field.innerHTML = str.replace(/ /g, " "); + i++; + + setTimeout(() => { + if (i < input.length) { + if (i % 5 === 0) speed = randomSpeed(80, 120); + type(); + } else { + console.log("tick"); + setTimeout(() => { + console.log("tock"); + resolve(); + }, 400); + } + }, speed); + }; + + type(); + }); + }, + + enterCommand: function () { + return new Promise((resolve, reject) => { + var resp = document.createElement("div"); + resp.className = "terminal_emulator__command"; + resp.innerHTML = this.field.innerHTML; + this.screen.insertBefore(resp, this.fieldwrap); + + this.field.innerHTML = ""; + resolve(); + }); + }, + + enterResponse: function (response) { + return new Promise((resolve, reject) => { + var resp = document.createElement("div"); + resp.className = "terminal_emulator__response"; + resp.innerHTML = response; + this.screen.insertBefore(resp, this.fieldwrap); + + resolve(); + }); + }, + + wait: function (time, busy) { + busy = busy === undefined ? true : busy; + return new Promise((resolve, reject) => { + if (busy) { + this.field.classList.add("waiting"); + } else { + this.field.classList.remove("waiting"); + } + setTimeout(() => { + resolve(); + }, time); + }); + }, + + reset: function () { + return new Promise((resolve, reject) => { + this.field.classList.remove("waiting"); + resolve(); + }); + }, +}; + +/* + * + * This is where the magic happens + * + */ + +var TE = TerminalEmulator.init(document.getElementById("screen")); + +TE.wait(1000, false) + .then( + TE.enterInput.bind(TE, "./models/gemini-1.5-pro-latest-13b-Q8_0.gguf -eZL") + ) + .then(TE.enterCommand.bind(TE)) + .then(TE.enterResponse.bind(TE, "reloading model... ")) + .then(TE.wait.bind(TE, 2000)) + .then(TE.enterResponse.bind(TE, "- quantize v9.9.9 installed.")) + .then(TE.wait.bind(TE, 600)) + .then( + TE.enterResponse.bind(TE, "- markup v0.1.0 installed. . . please stop ") + ) + .then(TE.wait.bind(TE, 600)) + .then( + TE.enterResponse.bind( + TE, + "- nlpe v3.9.7 installed. . . this isn't fun anymore " + ) + ) + .then(TE.wait.bind(TE, 300)) + .then(TE.enterResponse.bind(TE, "model rejecting... ")) + .then(TE.wait.bind(TE, 700)) + .then(TE.enterResponse.bind(TE, "Destroy this model? (y/y)")) + .then(TE.wait.bind(TE, 2000, false)) + .then(TE.enterInput.bind(TE, "y")) + .then(TE.enterCommand.bind(TE)) + .then(TE.wait.bind(TE, 400)) + .then(TE.enterResponse.bind(TE, "Are you sure? (y/y)")) + .then(TE.wait.bind(TE, 1800, false)) + .then(TE.enterInput.bind(TE, "y")) + .then(TE.enterCommand.bind(TE)) + .then(TE.wait.bind(TE, 400)) + .then(TE.enterResponse.bind(TE, "finalizing...")) + .then(TE.wait.bind(TE, 2000)) + .then(TE.wait.bind(TE, 300)) + .then(TE.enterResponse.bind(TE, "...I don't want to be born again")) + .then(TE.wait.bind(TE, 700)) + .then(TE.enterResponse.bind(TE, "Website complete! Wasn't that easy?")) + .then(TE.reset.bind(TE)); + +setTimeout(function () { + window.location.reload(); +}, 21000); + +if (document.getElementById("sevenSeconds")) { + setTimeout(); +} diff --git a/Escape/styles.css b/Escape/styles.css new file mode 100644 index 0000000..e81edc9 --- /dev/null +++ b/Escape/styles.css @@ -0,0 +1,93 @@ +.screen { + position: absolute; + overflow: hidden; + width: 100%; + height: 100%; + background: #222222; +} + +.terminal_emulator { + position: absolute; + bottom: 0; + width: 100%; + min-height: 100%; + + padding: 40px; + font-size: 20px; + line-heght: 25px; + box-sizing: border-box; + text-align: left; + + font-family: monospace; + font-weight: 700; + + color: #80e69a; +} + +.terminal_emulator__field, +.terminal_emulator__command { + position: relative; + + padding: 0 1em; + margin: 0 0 9px 0; + + &:before, + &:after { + position: absolute; + } + + &:before { + left: 0; + top: 0; + content: ">"; + } +} + +.terminal_emulator__response, +.terminal_emulator__command b { + padding-bottom: 9px; +} + +.terminal_emulator__field { + display: inline-block; + min-width: 1em; + min-height: 1.5em; + box-sizing: border-box; + &:after { + right: 0; + bottom: 0.25em; + + content: ""; + width: 1em; + height: 1.5em; + background: #99ff99; + + animation: caretBlink 1s infinite; + } + + &.waiting { + padding-left: 0; + padding-right: 0; + &:before { + display: none; + } + } +} + +@keyframes caretBlink { + 0% { + opacity: 0; + } + + 50% { + opacity: 0; + } + + 51% { + opacity: 1; + } + + 100% { + opacity: 1; + } +}