diff --git a/index.html b/index.html new file mode 100644 index 0000000..e7214e1 --- /dev/null +++ b/index.html @@ -0,0 +1,185 @@ + + + + + + MiningTcup + + + +
+
+
+

+ Ted Pier a.k.a MiningTcup +

+
+
+
+

Things I've Done

+ +

YouClient

+

+ My middle school gave each student an incredibly weak + Chromebook infested with blockers and spyware, and + didn't allow us to bring our own computers. Since one of + my strongest skills at the time was web dev, I made an + alternative YouTube client. The entire thing is a single + html file, making it easy to distribute and run. + Advantages over using the official YouTube website are + faster loading, no ads, tab customization, anti-unload, + no browser history, and no spyware spying. +

+

+ Linux +

+

+ The kernel is the core of the operating system. Linux is + an alternative operating system kernel, similar to the + Windows or MacOS kernels. It can run on nearly any + device (including PCs and Macs), and is used by Android. + One of my favorite things to do is mess with + configuration files on my + Arch Linux + + + Hyprland + system. Over the last more than a year, I've settled on + an (in my opinion) nearly perfect configuration. +

+

+ Notes +

+

+ I'd always wanted to use a notes app, but I never liked + any of the options. Instead of paying with my + information, time, or money for one that someone else + made, I decided to make my own. I wrote the server in + Go, the language which I believe is best for anything to + do with servers, and the app in Android Studio using + Kotlin. After completing the server, I accidentally + deleted the source code, prompting me to recode it. It's + finished now, and you can view the most likely terrible + source code for the server + here. Although I don't plan on giving out the source code + for the app because it's so terrible, you can download + the APK file here. +

+
+
+
+
+
+ + + + + + + + + + + + + + + + + +
+
+ + diff --git a/lulu.webp b/lulu.webp new file mode 100644 index 0000000..0004b01 Binary files /dev/null and b/lulu.webp differ diff --git a/notes.apk b/notes.apk new file mode 100644 index 0000000..52e8fb7 Binary files /dev/null and b/notes.apk differ diff --git a/script.js b/script.js new file mode 100644 index 0000000..e69de29 diff --git a/style.css b/style.css new file mode 100644 index 0000000..a95117a --- /dev/null +++ b/style.css @@ -0,0 +1,106 @@ +@keyframes spinner-a { + from { + transform: rotate(0deg); + } + to { + transform: rotate(360deg); + } +} + +@keyframes spinner-b { + from { + transform: rotate(0deg); + } + to { + transform: rotate(180deg); + } +} + +#path1-3 { + transform-origin: 50% 50%; + animation-duration: 2s; + animation-name: spinner-a; + animation-timing-function: ease-in-out; + animation-direction: alternate; + animation-iteration-count: infinite; +} + +#path1-4 { + transform-origin: 50% 50%; + animation-duration: 1.1s; + animation-name: spinner-b; + animation-timing-function: ease-in-out; + animation-direction: alternate; + animation-iteration-count: infinite; +} + +#spinner-container { + width: 64px; + height: 64px; +} + +#overlay { + background: #88888888; + display: flex; + align-items: center; + justify-content: center; + display: none; +} + +#content { + max-width: 512px; +} + +h2, +h3 { + margin-top: 16px; + margin-bottom: 0; +} + +p { + margin-top: 0; + margin-bottom: 16px; +} + +.centerer { + display: flex; + justify-content: center; + align-items: center; +} + +.subtitle { + font-size: 16px; + color: grey; + margin-top: 0; + margin-left: 8px; +} + +.relative { + position: relative; +} + +.absolute-fill { + position: absolute; + top: 0; + bottom: 0; + left: 0; + right: 0; +} + +#title-1 { + background-image: url(lulu.webp); + background-size: 60%; + background-position: 100% 35%; + color: #ffffff; +} + +#title-1 * { + margin: 0; + padding: 16px; + background: #000000; + width: max-content; +} + +body { + margin: 8px; +} diff --git a/text-to-image/gg-sans.woff2 b/text-to-image/gg-sans.woff2 new file mode 100644 index 0000000..b42d8b6 Binary files /dev/null and b/text-to-image/gg-sans.woff2 differ diff --git a/text-to-image/index.html b/text-to-image/index.html new file mode 100644 index 0000000..938dc3c --- /dev/null +++ b/text-to-image/index.html @@ -0,0 +1,24 @@ + + + + + + Text to Image + + + +
+ + + + preview +
+ + + diff --git a/text-to-image/script.js b/text-to-image/script.js new file mode 100644 index 0000000..64dbc46 --- /dev/null +++ b/text-to-image/script.js @@ -0,0 +1,66 @@ +const $ = (x) => document.getElementById(x); + +const input = $("input"); +const canvas = $("canvas"); +const preview = $("preview"); +const background = $("background"); + +const ctx = canvas.getContext("2d"); +const lineHeight = 22; + +let height = 0; +let line = 0; + +input.addEventListener("input", () => { + const lines = input.value.split("\n"); + height = lines.length; + canvas.width = 512; + ctx.font = + '16px "gg sans", "Noto Sans", "Helvetica Neue", Helvetica, Arial, sans-serif'; + ctx.textBaseline = "hanging"; + line = 0; + lines.forEach(renderText); + canvas.height = 22 * height; + ctx.fillStyle = background.value; + ctx.fillRect(0, 0, canvas.width, canvas.height); + ctx.fillStyle = "#EFEFF0"; + ctx.font = + '16px "gg sans", "Noto Sans", "Helvetica Neue", Helvetica, Arial, sans-serif'; + ctx.textBaseline = "hanging"; + line = 0; + lines.forEach(renderText); + preview.src = canvas.toDataURL(); + canvas.toBlob((blob) => { + const item = new ClipboardItem({ "image/png": blob }); + navigator.clipboard.write([item]); + }); +}); + +input.addEventListener("keydown", (e) => { + if (e.key == "c" && e.ctrlKey) { + e.preventDefault(); + } +}); + +function renderText(item, i) { + line++; + if (ctx.measureText(item).width > canvas.width) { + let rn = ctx.measureText(item).width; + let goal = canvas.width; + let len = item.length; + while (rn > goal) { + len--; + rn = ctx.measureText(item.slice(0, len)).width; + } + ctx.fillText( + item.slice(0, len), + 0, + (line - 1) * lineHeight + 2, + canvas.width, + ); + renderText(item.slice(len), line); + height++; + } else { + ctx.fillText(item, 0, (line - 1) * lineHeight + 2, canvas.width); + } +} diff --git a/text-to-image/style.css b/text-to-image/style.css new file mode 100644 index 0000000..9e2240f --- /dev/null +++ b/text-to-image/style.css @@ -0,0 +1,28 @@ +@font-face { + font-family: "gg sans"; + src: url(gg-sans.woff2); +} + +textarea { + outline: none; + font-size: 16px; + font-family: + "gg sans", "Noto Sans", "Helvetica Neue", Helvetica, Arial, sans-serif; + line-height: 22px; + white-space: pre-wrap; + resize: none; + height: max-content; + padding: 0; + border: 0; +} + +canvas { + display: none; +} + +div { + display: flex; + flex-direction: column; + width: 512px; + background: #aaaaaa; +}