Skip to content

Instantly share code, notes, and snippets.

@skybrian
skybrian / gist:7c64eeccc2593550f54e6f5b8be948ca
Last active October 3, 2026 01:59
Japanese financial assets abroad, 1996–2025
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Japanese financial assets abroad — moved</title>
<meta http-equiv="refresh"
content="0;url=https://pages.skybrian.com/2026/japanese-financial-assets-abroad/">
<link rel="canonical"
href="https://pages.skybrian.com/2026/japanese-financial-assets-abroad/">
@skybrian
skybrian / clock-skew.test.ts
Created July 27, 2026 03:51
TypeScript test that fails if Linux monotonic clock jumps backwards
/**
* Host-health test for the monotonic clock Chromium uses for TimeTicks.
*
* Move this test process between two CPUs permitted by its cpuset while a
* synchronous loop samples performance.now(). This deliberately does not
* await while sampling: taskset changes affinity through the kernel.
*/
import { assertEquals } from "@std/assert";
@skybrian
skybrian / html_piano_keyboard.md
Created March 26, 2023 03:57
ChatGPT session to build an HTML Piano Keyboard

Model: GPT4

Could you write HTML to draw 12 rectangles horizontally, representing a piano keyboard? The cells should have a different CSS class for white notes and black notes.

To create a piano keyboard with 12 rectangles horizontally, you can use HTML and CSS. Here's a simple example:

<!DOCTYPE html>
<html lang="en">
<head>
@skybrian
skybrian / attempt1.txt
Last active July 27, 2020 21:12
GPT3 (AI Dungeon) on the Titanic
Prompt:
Q: Who was president in 1982?
A: Ronald Reagan.
Q: What does "Jongleur" mean?
A: "Jongleur" is a French word meaning "Juggler".
Q: Who is Bilbo Baggins?
A: He is a fictional character in the book "The Hobbit". He is a hobbit who goes on a quest to defeat a dragon.
@skybrian
skybrian / main.dart
Last active March 2, 2020 04:01
Hello, Flutter World
import 'package:flutter/material.dart';
void main() => runApp(App());
class App extends StatelessWidget {
@override
Widget build(BuildContext ctx) {
return MaterialApp(home: new Home());
}
}

Keybase proof

I hereby claim:

  • I am skybrian on github.
  • I am skybrian (https://keybase.io/skybrian) on keybase.
  • I have a public key ASDuNo6oD_oqwbWJcDOXYhWqFDLFXrGC7pMYbT76N-lIngo

To claim this, I am signing this object:

{
"[plaintext]": {
"editor.quickSuggestions": false,
"editor.wordWrap": "bounded"
},
// See: https://github.com/Microsoft/vscode/issues/34606
"editor.autoClosingBrackets": false,
"editor.stablePeek": true,
"files.autoSave": "onFocusChange",
import Html
import Html.Events as Events
import Http
import Json.Decode as Json exposing ((:=))
import Signal
import Task
main = mysteryButton2
-- before
@skybrian
skybrian / grid.dart
Created August 1, 2015 00:52
test of angular 2 change detection
import 'dart:html';
import 'package:angular2/angular2.dart';
import 'package:angular2/src/reflection/reflection.dart' show reflector;
import 'package:angular2/src/reflection/reflection_capabilities.dart'
show ReflectionCapabilities;
void main() {
reflector.reflectionCapabilities = new ReflectionCapabilities();
bootstrap(Grid);
import Dict
import Graphics.Input (Input, input, hoverable)
import Mouse
import Window
type Pixel = (Int)
type Palette = {length: Int, colors: Dict.Dict Pixel Color}
makePalette: [Color] -> Palette