Skip to content

Commit

Permalink
a lot of stuff. probably too much. oh well
Browse files Browse the repository at this point in the history
  • Loading branch information
gschare committed Sep 16, 2024
1 parent 52b1f6b commit 73d3388
Show file tree
Hide file tree
Showing 51 changed files with 1,133 additions and 155 deletions.
Binary file added content/assets/img/garden/books/kamalaharris.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added content/assets/img/tidings/cambridge/d-ivy.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added content/assets/img/tidings/cambridge/d-lines.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added content/assets/img/tidings/cambridge/d-pink.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added content/assets/img/tidings/cambridge/d-spire.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
25 changes: 25 additions & 0 deletions content/css/default.css
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@
--fg-light-accent: palevioletred;
}

html {
min-height: 100%;
}

@font-face {
font-family: 'Cascadia Code PL';
src: url('/assets/fonts/CascadiaCodePL.woff2') format('woff2');
Expand Down Expand Up @@ -43,6 +47,27 @@ p .warning {
color: tomato;
}

/* prose */
div.prose p {
margin: 0;
text-align: justify;
text-indent: 2rem;
}

div.prose hr {
text-align: center;
border: none;
line-height: 2rlh;
&:before {
content: "*";
}
}

div.prose br {
line-height: 2rlh;
}
/* end prose */

/* poem */
div.poem {
padding-left: 18px;
Expand Down
3 changes: 3 additions & 0 deletions content/garden/alien-citizen.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# An alien becomes a citizen of the United States. What does he know?

TODO
8 changes: 3 additions & 5 deletions content/garden/bookmarks.html
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
<!-- provenance: local 23.09.02-17.21.md -> garden/bookmarks.html -->
<h2 id="simple-federated-bookmarking">Simple federated bookmarking</h2>
<span class="date">Created: <span id="date">Sep 2, 2023</span>.</span>
<span class="date">Last updated: Jan 15, 2024.</span>
<title>
Links
</title>
<h2 id="simple-federated-bookmarking">Simple federated bookmarking</h2>
<span id="date-created"><em>Created: Sep 2, 2023.</em></span> <span
id="date-updated"><em>Last updated: Jan 15, 2024.</em></span>
<p>
</p>
<hr />
<div class="fancyquote">
<blockquote>
Expand Down
3 changes: 2 additions & 1 deletion content/garden/books.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ <h1 id="books">Books</h1>
<h2 id="in-progress">In Progress</h2>
<div class="flex">
<img src="/assets/img/garden/books/lhod.jpg" />
<img src="/assets/img/garden/books/idiot.jpg" />
<img src="/assets/img/garden/books/toolsforconviviality.jpg" />
<img src="/assets/img/garden/books/piranesi.jpg" />
<img src="/assets/img/garden/books/dune.webp" />
Expand All @@ -40,6 +39,8 @@ <h2 id="in-progress">In Progress</h2>
</div>
<h2 id="section">2024</h2>
<div class="flex">
<img src="/assets/img/garden/books/kamalaharris.jpg" />
<img src="/assets/img/garden/books/idiot.jpg" />
<img src="/assets/img/garden/books/gita.jpg" />
<img src="/assets/img/garden/books/leguintombs.jpg" />
<img src="/assets/img/garden/books/leguinlathe.jpg" />
Expand Down
3 changes: 2 additions & 1 deletion content/garden/books.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
## In Progress
<div class="flex">
<img src="/assets/img/garden/books/lhod.jpg" />
<img src="/assets/img/garden/books/idiot.jpg" />
<img src="/assets/img/garden/books/toolsforconviviality.jpg" />
<img src="/assets/img/garden/books/piranesi.jpg" />
<img src="/assets/img/garden/books/dune.webp" />
Expand All @@ -38,6 +37,8 @@
## 2024

<div class="flex">
<img src="/assets/img/garden/books/kamalaharris.jpg" />
<img src="/assets/img/garden/books/idiot.jpg" />
<img src="/assets/img/garden/books/gita.jpg" />
<img src="/assets/img/garden/books/leguintombs.jpg" />
<img src="/assets/img/garden/books/leguinlathe.jpg" />
Expand Down
302 changes: 302 additions & 0 deletions content/garden/chiang.html

Large diffs are not rendered by default.

9 changes: 5 additions & 4 deletions content/garden/flog/index.html
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<title>
Flog (Film Log)
</title>
<!-- provenance: local 24.08.03-18.57.md -> garden/flog/index.html -->
<nav class="secondary">
<a href="/garden/books.html">books</a>
</nav>
<h1 id="flog">Flog <!-- film log --></h1>
<!-- provenance: local 24.08.03-18.57.md -> garden/flog/index.html -->
<title>
Flog (Film Log)
</title>
<p>See also: my <a
href="https://letterboxd.com/gschare/">Letterboxd</a></p>
<style>
Expand All @@ -31,6 +31,7 @@ <h1 id="flog">Flog <!-- film log --></h1>
watch…</span></p>
<h2 id="section">2024</h2>
<div class="flex">
<img src="https://a.ltrbxd.com/resized/sm/upload/nx/8b/vs/gc/cDbNAY0KM84cxXhmj8f0dLWza3t-0-2000-0-3000-crop.jpg?v=49eed12751" />
<img src="https://a.ltrbxd.com/resized/film-poster/7/5/2/6/2/6/752626-la-chimera-0-2000-0-3000-crop.jpg?v=8f8cf76e33" />
<img src="https://a.ltrbxd.com/resized/film-poster/9/5/2/8/1/2/952812-american-fiction-0-2000-0-3000-crop.jpg?v=fbc2c6daf1" />
<img src="https://a.ltrbxd.com/resized/film-poster/4/6/5/9/7/46597-the-messenger-the-story-of-joan-of-arc-0-2000-0-3000-crop.jpg?v=a963f30ee3" />
Expand Down
4 changes: 2 additions & 2 deletions content/garden/laziness.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<!-- provenance: local 24.06.08-05.55.md -> garden/laziness.html -->
<h1 id="laziness">Laziness</h1>
<span id="date"><em>Jun 7, 2024</em></span>
<title>
Laziness
</title>
<h1 id="laziness">Laziness</h1>
<p><span id="date"><em>Jun 7, 2024</em></span></p>
<p>When researchers talk about the differences between programming
languages, we have a number of axes on which to formally compare them.
<a href="https://en.wikipedia.org/wiki/Tony_Hoare">Tony Hoare</a> gave
Expand Down
36 changes: 36 additions & 0 deletions content/garden/name.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<h1 id="name">Name</h1>
<title>
Name
</title>
<!-- provenance: local 24.09.15-10.33.md -> garden/name.html -->
<h2 id="tldr">Tl;dr</h2>
<p>Gregory -&gt; Carmel</p>
<h2 id="short-version">Short Version</h2>
<p>I’m going by Carmel in non-legal settings. That means I’m Carmel in
social and professional life, MIT’s HR system, and my online presence,
but not on my driver’s license, passport, or taxes.</p>
<p>I won’t be offended if you still call me Gregory (that is also my
name) but I prefer Carmel.</p>
<h2 id="faq">FAQ</h2>
<h3 id="wait-i-dont-get-it.-what-do-i-call-you">Wait, I don’t get it.
What do I call you?</h3>
<p>You can call me whatever you’re used to calling me, and you can
additionally call me Carmel. I have a preference for the latter in the
same way I have a preference for “Gregory” over “Greg.”</p>
<p>My full name is Carmel Schare or Gregory Schare.</p>
<p>I also accept Gigi, though things may start to get confusing with
that many names so if you want to use that, maybe refrain from using it
outside of casual social settings.</p>
<h3 id="why-carmel">Why Carmel?</h3>
<p>Carmel has been one of my given names my entire life, since my bris.
I like how it sounds and I like its associations as explained to me by
my parents.</p>
<h3 id="what-prompted-the-change">What prompted the change?</h3>
<p>I feel a deeper connection with the name Carmel.</p>
<h3 id="is-this-political">Is this political?</h3>
<p>No. (I’ve been experimenting with the name change for several years,
long before 2023. In general, I do not identify with Zionism.)</p>
<h3 id="are-you-transgender">Are you transgender?</h3>
<p>I don’t know. Are you?</p>
<h3 id="you-cant-do-that.">You can’t do that.</h3>
<p>That’s not a question. Also, yes I can.</p>
8 changes: 3 additions & 5 deletions content/garden/questions.html
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
<!-- provenance: local 23.11.17-11.17.md -> garden/questions.html -->
<h1 id="questions-for-people">Questions for People</h1>
<span class="date">Created <span id="date">Nov 17, 2023</span>.</span>
<span class="date">Last updated May 28, 2024.</span>
<title>
Questions for People
</title>
<h1 id="questions-for-people">Questions for People</h1>
<span id="date-created"><em>Created Nov 17, 2023.</em></span> <span
id="date-updated"><em>Last updated May 28, 2024.</em></span>
<p>
</p>
<hr />
<h2 id="questions-for-love">36 Questions for Love</h2>
<h3 id="set-i">Set I</h3>
Expand Down
23 changes: 22 additions & 1 deletion content/lab/dither/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@ function dither(file) {
context.drawImage(img, 0, 0, width, height);
const imgData = context.getImageData(0, 0, width, height);

const newData = monochrome(imgData, 'floydsteinberg', 0.5);
const blackHex = document.getElementById('black-color').value;
const whiteHex = document.getElementById('white-color').value;

const newData = monochrome(imgData, 'floydsteinberg', 0.5, blackHex, whiteHex);
context.putImageData(newData, 0, 0);

const ditheredUrl = canvas.toDataURL('image/png');
Expand Down Expand Up @@ -57,6 +60,17 @@ function dragOverHandler(ev) {
ev.preventDefault();
}

function swapColors() {
const black = document.getElementById('black-color');
const white = document.getElementById('white-color');

const b = black.value;
const w = white.value;

black.value = w;
white.value = b;
}

window.onload = (e) => {
const slider = document.getElementById('width-slider');
const result = document.getElementById('width-result');
Expand All @@ -73,4 +87,11 @@ window.onload = (e) => {
}
slider.value = e.target.value;
});

const upload = document.getElementById('upload');
upload.addEventListener('change', (e) => {
if (e.target.files && e.target.files[0]) {
dither(e.target.files[0]);
}
});
}
37 changes: 36 additions & 1 deletion content/lab/dither/dither.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,28 @@ for (var i=0; i<256; i++) {
lumB[i] = i*0.114;
}

function monochrome(imageData, threshold, type){
function hexToRgb(hex) {
// Remove the '#' character if it exists
hex = hex.replace(/^#/, '');

// Convert 3-digit hex to 6-digit hex if necessary
if (hex.length === 3) {
hex = hex.split('').map(char => char + char).join('');
}

// Parse the hex string into RGB values
const bigint = parseInt(hex, 16);
const r = (bigint >> 16) & 255;
const g = (bigint >> 8) & 255;
const b = bigint & 255;

return [r, g, b];
}

function monochrome(imageData, threshold, type, blackHex, whiteHex){

const blackColor = hexToRgb(blackHex);
const whiteColor = hexToRgb(whiteHex);

var imageDataLength = imageData.data.length;

Expand Down Expand Up @@ -77,6 +98,20 @@ function monochrome(imageData, threshold, type){
// Set g and b pixels equal to r
imageData.data[currentPixel + 1] = imageData.data[currentPixel + 2] = imageData.data[currentPixel];
}

// change every pixel to the right colors
for (var currentPixel = 0; currentPixel <= imageDataLength; currentPixel+=4) {
const r = imageData.data[currentPixel];
if (r === 0) {
imageData.data[currentPixel] = blackColor[0];
imageData.data[currentPixel+1] = blackColor[1];
imageData.data[currentPixel+2] = blackColor[2];
} else if (r === 255) {
imageData.data[currentPixel] = whiteColor[0];
imageData.data[currentPixel+1] = whiteColor[1];
imageData.data[currentPixel+2] = whiteColor[2];
}
}

return imageData;
}
14 changes: 13 additions & 1 deletion content/lab/dither/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,24 @@ <h1>Ditherer</h2>
<input type="number" id="width-result" value="600" style="width: 4rem">
</div>

<div class="colorscontainer">
<label for="color">Colors</label>
<input type="color" id="white-color" value="#ffffff">
<input type="color" id="black-color" value="#000000">
<button id="swap-colors" onclick="swapColors()">Swap</button>
</div>

<div id="container">

<div class="row">

<div class="col">
<p>Drag & drop a file below!</p>
<div>
<p>Drag & drop a file below!
<label for="upload">Or upload!</label>
<input type="file" id="upload"/>
</p>
</div>

<div id="dropzone"
ondrop="dropHandler(event);"
Expand Down
11 changes: 11 additions & 0 deletions content/tidings/cambridge.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!-- provenance: local 24.09.16-16.11.md -> tidings/cambridge.html -->
<h1 id="todotitle-tidings">TODO(title) | Tidings</h1>
<span id="date">Sep 16, 2024</span>
<title>
TODO
</title>
<p><img src="/assets/img/tidings/cambridge/d-pink.png" /></p>
<p><img src="/assets/img/tidings/cambridge/d-ivy.png" /></p>
<p><img src="/assets/img/tidings/cambridge/d-lines.png" /></p>
<p><img src="/assets/img/tidings/cambridge/d-spire.png" /></p>
<p><img src="/assets/img/tidings/cambridge/d-cambridge.png" /></p>
6 changes: 2 additions & 4 deletions content/tidings/pretending.html
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
<!-- provenance: local 24.06.07-02.16.md -> tidings/pretending.html -->
<h1 id="pretending-pretension">Pretending &amp; Pretension</h1>
<span id="date">Jun 27, 2024</span>
<title>
Pretending &amp; Pretension
</title>
<h1 id="pretending-pretension">Pretending &amp; Pretension</h1>
<span id="date"><em>Jun 27, 2024</em></span>
<p>
</p>
<hr />
<h3 id="table-of-contents">Table of Contents</h3>
<ul>
Expand Down
6 changes: 2 additions & 4 deletions content/tidings/start.html
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
<!-- provenance: local 24.05.05-19.56.md -> tidings/start.html -->
<h1 id="here-i-am-trying-a-new-thing">Here I am, trying a new thing</h1>
<span id="date">May 5, 2024</span>
<title>
Trying A New Thing
</title>
<h1 id="here-i-am-trying-a-new-thing">Here I am, trying a new thing</h1>
<span id="date"><em>May 5, 2024</em></span>
<p>
</p>
<hr />
<p>Dear <a
href="/assets/img/tidings/start/cartwheel.jpg">Cartwheel</a>,</p>
Expand Down
Binary file added docs/assets/img/garden/books/kamalaharris.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/img/tidings/cambridge/d-cambridge.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/img/tidings/cambridge/d-ivy.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/img/tidings/cambridge/d-lines.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/img/tidings/cambridge/d-pink.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/img/tidings/cambridge/d-spire.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
25 changes: 25 additions & 0 deletions docs/css/default.css
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@
--fg-light-accent: palevioletred;
}

html {
min-height: 100%;
}

@font-face {
font-family: 'Cascadia Code PL';
src: url('/assets/fonts/CascadiaCodePL.woff2') format('woff2');
Expand Down Expand Up @@ -43,6 +47,27 @@ p .warning {
color: tomato;
}

/* prose */
div.prose p {
margin: 0;
text-align: justify;
text-indent: 2rem;
}

div.prose hr {
text-align: center;
border: none;
line-height: 2rlh;
&:before {
content: "*";
}
}

div.prose br {
line-height: 2rlh;
}
/* end prose */

/* poem */
div.poem {
padding-left: 18px;
Expand Down
Loading

0 comments on commit 73d3388

Please sign in to comment.