robots.txt
See which AI crawlers other sites block →# As a condition of accessing this website, you agree to abide by the following
# content signals:
# (a) If a Content-Signal = yes, you may collect content for the corresponding
# use.
# (b) If a Content-Signal = no, you may not collect content for the
# corresponding use.
# (c) If the website operator does not include a Content-Signal for a
# corresponding use, the website operator neither grants nor restricts
# permission via Content-Signal with respect to the corresponding use.
# The content signals and their meanings are:
# search: building a search index and providing search results (e.g., returning
# hyperlinks and short excerpts from your website's contents). Search does not
# include providing AI-generated search summaries.
# ai-input: inputting content into one or more AI models (e.g., retrieval
# augmented generation, grounding, or other real-time taking of content for
# generative AI search answers).
# ai-train: training or fine-tuning AI models.
# use: how AI systems may consume the content (immediate, reference, or full).
# ANY RESTRICTIONS EXPRESSED VIA CONTENT SIGNALS ARE EXPRESS RESERVATIONS OF
# RIGHTS UNDER ARTICLE 4 OF THE EUROPEAN UNION DIRECTIVE 2019/790 ON COPYRIGHT
# AND RELATED RIGHTS IN THE DIGITAL SINGLE MARKET.
# BEGIN Cloudflare Managed content
User-agent: *
Content-Signal: search=yes,ai-train=no,use=reference
Allow: /
# Training crawlers
User-agent: Amazonbot
Disallow: /
User-agent: Applebot-Extended
Disallow: /
User-agent: Bytespider
Disallow: /
User-agent: CCBot
Disallow: /
User-agent: ClaudeBot
Disallow: /
User-agent: Diffbot
Disallow: /
User-agent: Google-Extended
Disallow: /
User-agent: GPTBot
Disallow: /
User-agent: omgili
Disallow: /
User-agent: anthropic-ai
Disallow: /
User-agent: Claude-Web
Disallow: /
User-agent: cohere-ai
Disallow: /
User-agent: MistralAI-Training
Disallow: /
User-agent: meta-externalagent
Disallow: /
User-agent: GoogleOther
Disallow: /
User-agent: Baiduspider
Disallow: /
User-agent: PetalBot
Disallow: /
User-agent: AwarioSmartBot
User-agent: AwarioRssBot
Disallow: /
User-agent: Google-CloudVertexBot
Disallow: /
User-agent: QualifiedBot
Disallow: /
User-agent: Cotoyogi
Disallow: /
User-agent: ICC-Crawler
Disallow: /
User-agent: atlassian-bot
Disallow: /
User-agent: FishBot
Disallow: /
User-agent: BorderxBot
Disallow: /
User-agent: NavuBot
Disallow: /
User-agent: SemrushBot-SWA
Disallow: /
User-agent: WARDBot
Disallow: /
User-agent: magpie-crawler
Disallow: /
User-agent: KimiBot
Disallow: /
User-agent: CitibotSiteCrawler
Disallow: /
# END Cloudflare Managed Content
<!DOCTYPE html>
<html lang="en">
<head>
<link href="https://fonts.googleapis.com/css2?family=Crimson+Text:ital,wght@0,400;0,600;0,700;1,400;1,600;1,700&family=Manufacturing+Consent&display=swap" rel="stylesheet">
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Shane McGraw</title>
<link rel="stylesheet" href="/styles.css">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Crimson+Text:ital,wght@0,400;0,600;0,700;1,400;1,600;1,700&family=Manufacturing+Consent&display=swap" rel="stylesheet">
<style>
.sleep-message .first-line {
display: flex;
align-items: flex-end;
}
.sleep-message div {
font-family: "Manufacturing Consent", serif;
font-size: 48px;
line-height: .9;
text-align: left;
margin-top: 8px;
color: #e5e5e1;
.letter {
border: 1px solid #886e11;
padding: 0 2px 0 2px;
font-family: "Manufacturing Consent", serif;
font-size: 180px;
margin-right: 6px;
}
}
@media (max-width: 480px) {
.sleep-message div {
font-size: 28px;
.letter {
font-size: 120px;
}
}
}
</style>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
</head>
<body>
<div id="stars" aria-hidden="true"></div>
<div id="moon"></div>
<div class="nav-container">
<h1><a href="index.html">Shane McGraw</a></h1>
<nav>
<a href="about.html">About</a>
<a href="projects.html">Projects</a>
<a href="library.html">Ex libris</a>
</nav>
</div>
<main>
<p>Cultivator, tiller, gardener (<a href="/library">of sorts</a>); builder, <a href="/coffee">coffee</a> nerd. Likely rummaging through a bookstore's classics section right now.</p>
<p><em>My <a href="https://libraries.ink/@shane" target="_blank" rel="noopener noreferrer">public library</a>.</em></p>
<p> </p>
<!-- Planned for later this year:
- _Ethics in the Conflicts of Modernity_ — Alasdair MacIntyre
- _The Complete Stories_ — Flannery O'Connor
- _A Secular Age_ — Charles Taylor
- _Middlemarch_ — George Eliot
- _The Lord of the Rings_ — JRR Tolkien -->
</main>
<footer>
<div class="footer-stars">
<svg viewBox="0 0 100 100"><path d="M50 0 L54 40 L85 15 L60 46 L100 50 L60 54 L85 85 L54 60 L50 100 L46 60 L15 85 L40 54 L0 50 L40 46 L15 15 L46 40 Z"/></svg>
<svg viewBox="0 0 100 100"><path d="M50 0 L54 40 L85 15 L60 46 L100 50 L60 54 L85 85 L54 60 L50 100 L46 60 L15 85 L40 54 L0 50 L40 46 L15 15 L46 40 Z"/></svg>
<svg viewBox="0 0 100 100"><path d="M50 0 L54 40 L85 15 L60 46 L100 50 L60 54 L85 85 L54 60 L50 100 L46 60 L15 85 L40 54 L0 50 L40 46 L15 15 L46 40 Z"/></svg>
</div>
</footer>
<script>
window.getHour = function() {
var hour;
if (typeof window.debugHour === 'number') {
hour = window.debugHour;
} else {
var now = new Date();
var parts = new Intl.DateTimeFormat('en-US', {
timeZone: 'America/Los_Angeles',
hour: 'numeric', minute: 'numeric', second: 'numeric', hour12: false
}).formatToParts(now);
var get = function(type) { return parseInt(parts.find(function(p) { return p.type === type; }).value); };
hour = get('hour') + get('minute') / 60 + get('second') / 3600;
}
// Wrap 24 back to 0
return hour >= 24 ? hour - 24 : hour;
};
document.addEventListener('DOMContentLoaded', function() {
var bookstores = [
'https://greenapplebooks.com',
'https://citylights.com',
'https://bookstore.wordonfire.org'
];
var link = document.querySelector('a[href="/random-bookstore"]');
if (link) {
link.href = bookstores[Date.now() % bookstores.length];
link.target = '_blank';
link.rel = 'noopener noreferrer';
}
// Debug slider
if (new URLSearchParams(window.location.search).get('debug') != null) {
var debugPanel = document.createElement('div');
debugPanel.style.cssText = 'position:fixed;bottom:0;left:0;right:0;background:rgba(0,0,0,0.8);padding:12px 20px;z-index:9999;font-family:system-ui,sans-serif;font-size:14px;color:#fff;';
debugPanel.innerHTML = '<div style="display:flex;flex-direction:column;gap:8px;">' +
'<label style="display:flex;align-items:center;gap:12px;">Time: <input type="range" id="debug-time" min="0" max="24" step="0.1" style="flex:1;max-width:400px;"> <span id="debug-time-label" style="min-width:60px;">--:--</span></label>' +
'<label style="display:flex;align-items:center;gap:12px;">Date: <input type="range" id="debug-date" min="0" max="365" step="1" style="flex:1;max-width:400px;"> <span id="debug-date-label" style="min-width:100px;">---</span> <span id="debug-solar" style="color:#888;font-size:12px;"></span></label>' +
'</div>';
document.body.appendChild(debugPanel);
var timeSlider = document.getElementById('debug-time');
var timeLabel = document.getElementById('debug-time-label');
var dateSlider = document.getElementById('debug-date');
var dateLabel = document.getElementById('debug-date-label');
var solarLabel = document.getElementById('debug-solar');
var now = new Date();
timeSlider.value = now.getHours() + now.getMinutes() / 60;
// Calculate day of year
var startOfYear = new Date(now.getFullYear(), 0, 0);
var diff = now - startOfYear;
var dayOfYear = Math.floor(diff / (1000 * 60 * 60 * 24));
dateSlider.value = dayOfYear;
function formatTime(h) {
var hours = Math.floor(h) % 24;
var mins = Math.floor((h % 1) * 60);
return hours.toString().padStart(2, '0') + ':' + mins.toString().padStart(2, '0');
}
function formatDate(dayOfYear) {
var date = new Date(new Date().getFullYear(), 0, dayOfYear);
return date.toLocaleDateString('en-US', { month: 'short', day: 'numeric' });
}
function updateSolarInfo() {
var solar = window.getSolarTimes();
solarLabel.textContent = 'Sunrise: ' + formatTime(solar.sunrise) + ' | Sunset: ' + formatTime(solar.sunset);
}
timeLabel.textContent = formatTime(timeSlider.value);
dateLabel.textContent = formatDate(dateSlider.value);
updateSolarInfo();
timeSlider.addEventListener('input', function() {
window.debugHour = parseFloat(timeSlider.value);
timeLabel.textContent = formatTime(window.debugHour);
updateSky();
window.dispatchEvent(new CustomEvent('debugTimeChange', { detail: window.debugHour }));
});
dateSlider.addEventListener('input', function() {
var dayOfYear = parseInt(dateSlider.value);
var date = new Date(new Date().getFullYear(), 0, dayOfYear);
window.debugDate = date;
dateLabel.textContent = formatDate(dayOfYear);
// Regenerate stops for new date (updateSky will call generateStops)
updateSolarInfo();
updateSky();
window.dispatchEvent(new CustomEvent('debugTimeChange', { detail: window.debugHour }));
});
}
});
(function() {
// ---- Where the sun actually is ------------------------------------
// NOAA solar position for San Francisco, computed rather than looked up.
// The old monthly table was interpolated in standard time with a DST
// hour bolted on, which ran the evening about a quarter of an hour fast.
var RAD = Math.PI / 180;
var LAT = 37.7749, LON = -122.4194;
function sunParams(date) {
var T = (date.getTime() / 86400000 + 2440587.5 - 2451545.0) / 36525;
var L = (280.46646 + T * (36000.76983 + T * 0.0003032)) % 360;
if (L < 0) L += 360;
var g = 357.52911 + T * (35999.05029 - 0.0001537 * T);
var gr = g * RAD;
var C = Math.sin(gr) * (1.914602 - T * (0.004817 + 0.000014 * T))
+ Math.sin(2 * gr) * (0.019993 - 0.000101 * T)
+ Math.sin(3 * gr) * 0.000289;
var omega = 125.04 - 1934.136 * T;
var lambda = L + C - 0.00569 - 0.00478 * Math.sin(omega * RAD);
var eps = 23 + (26 + (21.448 - T * (46.815 + T * (0.00059 - T * 0.001813))) / 60) / 60
+ 0.00256 * Math.cos(omega * RAD);
var dec = Math.asin(Math.sin(eps * RAD) * Math.sin(lambda * RAD)) / RAD;
var y = Math.tan(eps * RAD / 2); y = y * y;
var e = 0.016708634 - T * (0.000042037 + 0.0000001267 * T);
var eot = 4 * (y * Math.sin(2 * L * RAD) - 2 * e * Math.sin(gr)
+ 4 * e * y * Math.sin(gr) * Math.cos(2 * L * RAD)
- 0.5 * y * y * Math.sin(4 * L * RAD)
- 1.25 * e * e * Math.sin(2 * gr)) / RAD;
return { dec: dec, eot: eot };
}
// Hours to add to UTC to reach San Francisco local time. Asking the
// platform means DST is never our problem.
function sfOffset(date) {
var parts = new Intl.DateTimeFormat('en-US', {
timeZone: 'America/Los_Angeles', hour12: false,
year: 'numeric', month: '2-digit', day: '2-digit',
hour: '2-digit', minute: '2-digit', second: '2-digit'
}).formatToParts(date);
var p = {};
parts.forEach(function(x) { if (x.type !== 'literal') p[x.type] = x.value; });
var asUTC = Date.UTC(p.year, p.month - 1, p.day, parseInt(p.hour, 10) % 24, p.minute, p.second);
return (asUTC - date.getTime() + 500) / 3600000;
}
function baseDate() {
var now = window.debugDate || new Date();
return now;
}
// Sun elevation and azimuth, in degrees, at a San Francisco local hour.
function sunPosition(localHour) {
var date = baseDate();
var off = sfOffset(date);
var utcHour = localHour - off;
var inst = new Date(Date.UTC(date.getFullYear(), date.getMonth(), date.getDate()) + utcHour * 3600000);
var sp = sunParams(inst);
var ha = ((utcHour * 60 + sp.eot + 4 * LON) / 4) - 180;
if (ha < -180) ha += 360;
if (ha > 180) ha -= 360;
var lat = LAT * RAD, dec = sp.dec * RAD, H = ha * RAD;
var sinEl = Math.sin(lat) * Math.sin(dec) + Math.cos(lat) * Math.cos(dec) * Math.cos(H);
var el = Math.asin(Math.max(-1, Math.min(1, sinEl))) / RAD;
var az = Math.atan2(Math.sin(H), Math.cos(H) * Math.sin(lat) - Math.tan(dec) * Math.cos(lat)) / RAD + 180;
// Refraction lifts the low sun by about half a degree.
if (el > -1.5) el += 1.02 / Math.tan((el + 10.3 / (el + 5.11)) * RAD) / 60;
return { elevation: el, azimuth: az };
}
window.sunPosition = sunPosition;
// The local hour at which the sun's centre passes h0 degrees.
function crossing(h0, rising) {
var date = baseDate();
var off = sfOffset(date);
var sp = sunParams(new Date(Date.UTC(date.getFullYear(), date.getMonth(), date.getDate()) + (12 - off) * 3600000));
var lat = LAT * RAD, dec = sp.dec * RAD;
var cosHA = (Math.sin(h0 * RAD) - Math.sin(lat) * Math.sin(dec)) / (Math.cos(lat) * Math.cos(dec));
if (cosHA > 1) return null; // never gets that high
if (cosHA < -1) return rising ? 0 : 24; // never gets that low
var ha = Math.acos(cosHA) / RAD;
return (720 - 4 * LON - sp.eot) / 60 + (rising ? -ha : ha) / 15 + off;
}
function getSolarTimes() {
return {
sunrise: crossing(-0.833, true),
sunset: crossing(-0.833, false),
civilStart: crossing(-6, true),
civilEnd: crossing(-6, false)
};
}
window.getSolarTimes = getSolarTimes;
// ---- What a sheet of paper looks like, held facing the sun ---------
// The background is not a picture of the sky. It is the colour of the
// page itself under whatever light San Francisco is getting, which is
// why it stays near white until the sun is genuinely low.
// Colour temperature of the warm half of the light. Above the horizon
// that is the direct beam: low sun means a long path through the
// atmosphere, Rayleigh scattering strips the blue, and it reddens hard
// over the last few degrees. Below the horizon the beam is gone and the
// warm half becomes the afterglow on the western sky, which starts near
// the colour the beam had and cools as it fades.
var WARM_CCT = [[-6,7000],[-5,5600],[-4,4600],[-3,3900],[-2,3300],[-1,2900],
[0,2600],[1,2900],[2,3200],[3,3450],[5,3800],[7,4100],[10,4400],
[15,4800],[20,5100],[30,5450],[40,5650],[60,5800],[90,5900]];
// The sky dome is the other illuminant: pure Rayleigh scatter, always
// cold, and colder still once only the blue hour is left.
var SKY_CCT = [[-6,16000],[-4,13500],[-2,11500],[0,10000],[5,9000],
[15,8200],[30,7600],[60,7200],[90,7000]];
// How much of the light is that warm half rather than the cold dome.
// The sheet is held FACING the sun, so the beam arrives at normal
// incidence and stays dominant nearly to the horizon - which is why
// golden hour is golden, and why modelling this as a horizontal surface
// gets it badly wrong. Past sunset the warm share is the fading
// afterglow, and the dome has it all by the end of civil twilight.
var WARM_FRAC = [[-6,0],[-5,0.12],[-4,0.24],[-3,0.38],[-2,0.52],[-1,0.66],
[-0.5,0.72],[0,0.78],[0.5,0.83],[2,0.88],[5,0.91],[10,0.92],
[20,0.91],[30,0.91],[60,0.90],[90,0.88]];
// How completely the eye discounts the illuminant. Under a high sun
// paper simply looks white; in strong low light the cast survives
// adaptation and you really do see the warmth. Never 1, which would
// erase the effect, and never 0, which would give the raw stimulus a
// camera records on a fixed daylight balance.
var ADAPT = [[-6,0.55],[-3,0.58],[0,0.62],[3,0.68],[8,0.75],[20,0.80],[90,0.82]];
// Relative brightness of the sheet. True illuminance falls by orders of
// magnitude between noon and civil dusk; the eye adapts across most of
// that and a page still has to be legible, so this is a deliberately
// compressed curve rather than raw lux.
var LEVEL = [[-6,0.30],[-5,0.38],[-4,0.49],[-3,0.62],[-2,0.76],[-1,0.88],
[0,0.96],[3,1],[90,1]];
function table(t, x) {
if (x <= t[0][0]) return t[0][1];
if (x >= t[t.length - 1][0]) return t[t.length - 1][1];
for (var i = 0; i < t.length - 1; i++) {
if (x >= t[i][0] && x <= t[i + 1][0]) {
return t[i][1] + (t[i + 1][1] - t[i][1]) * (x - t[i][0]) / (t[i + 1][0] - t[i][0]);
}
}
return t[t.length - 1][1];
}
// Colour temperature to CIE 1931 xy. Planckian locus below 4000K,
// the CIE daylight locus above it, where real sun-and-sky light sits.
function cctToXY(T) {
var x, y;
if (T < 4000) {
x = -0.2661239e9 / (T * T * T) - 0.2343589e6 / (T * T) + 0.8776956e3 / T + 0.179910;
if (T < 2222) y = -1.1063814 * x * x * x - 1.34811020 * x * x + 2.18555832 * x - 0.20219683;
else y = -0.9549476 * x * x * x - 1.37418593 * x * x + 2.09137015 * x - 0.16748867;
} else {
if (T <= 7000) x = -4.6070e9 / (T * T * T) + 2.9678e6 / (T * T) + 0.09911e3 / T + 0.244063;
else x = -2.0064e9 / (T * T * T) + 1.9018e6 / (T * T) + 0.24748e3 / T + 0.237040;
y = -3.000 * x * x + 2.870 * x - 0.275;
}
var X = x / y, Z = (1 - x - y) / y;
return norm([
3.2406 * X - 1.5372 - 0.4986 * Z,
-0.9689 * X + 1.8758 + 0.0415 * Z,
0.0557 * X - 0.2040 + 1.0570 * Z
]);
}
function norm(c) {
var m = Math.max(c[0], c[1], c[2]) || 1;
return [Math.max(0, c[0]) / m, Math.max(0, c[1]) / m, Math.max(0, c[2]) / m];
}
var PAPER = [253, 251, 247]; // the site's own stock, under neutral light
// The shaded flag asks for the far side of the same sheet, the edge the beam
// does not reach, lit by sky alone.
function paperColour(elev, shaded) {
var warm = cctToXY(table(WARM_CCT, elev));
var sky = cctToXY(table(SKY_CCT, elev));
var w = shaded ? 0 : table(WARM_FRAC, elev);
var mix = norm([0, 1, 2].map(function(i) { return warm[i] * w + sky[i] * (1 - w); }));
var k = table(ADAPT, elev);
var level = table(LEVEL, elev) * (shaded ? 0.93 : 1);
return PAPER.map(function(v, i) {
return Math.round(v * (mix[i] * (1 - k) + k) * level);
});
}
window.paperColour = paperColour;
// ---- The last twenty minutes ---------------------------------------
// Strict paper physics gives a soft apricot at sunset and then a slate
// grey, because warm beam and cold sky are opposed hues and averaging