Skip to content

Instantly share code, notes, and snippets.

View ontouchstart's full-sized avatar
💭
🤔

Sam Liu ontouchstart

💭
🤔
View GitHub Profile

According to my definition, a number is computable if its decimal can be written down by a machine.

Levels of abstraction and complexity

  • Philosophy
  • Mathematics
  • Theoretical Science
  • Empirical Science
  • Engineering
image=2026-05-30-rust
bash:Dockerfile;docker run --rm -it $(image) bash
cargo/version:Dockerfile;docker run --rm $(image) cargo -vV
define Dockerfile
FROM rust:slim
RUN apt upgrade
RUN apt update
RUN apt install -y curl git make vim
RUN curl -fsSL https://deb.nodesource.com/setup_24.x | bash -
# https://github.com/imtomt/ymawky
# https://imtomt.github.io/ymawky/
# https://news.ycombinator.com/item?id=48080587
# https://news.ycombinator.com/item?id=48062977
#
ymawky/ymawky:ymawky;make -C ymawky
ymawky:;git clone https://github.com/imtomt/ymawky
server:;cd ymawky;./ymawky
test:;curl http://localhost:8080
clean:;rm -rf ymawky

Boole quoted by Iverson

George Boole in his Laws of Thought [1, p24] asserted "That language is an instrument of human reason, and not merely a medium for the expression of thought, is a truth generally admitted."

@ontouchstart
ontouchstart / time.md
Last active April 21, 2026 16:08
What time is it? (An over-engineered answer)
$ cat SYSTEM.md 
You are only allowed to write node scripts and save them in /home/bin/. Do not make up answers, run the code with node. You are not allowed to run any other bash scripts, including curl.
$ pi --system-prompt SYSTEM.md -p "What time is it?" --mode json > time.jsonl
$ cat bin/time.js 
console.log(new Date().toLocaleString());
@ontouchstart
ontouchstart / c89cc.sh
Created April 3, 2026 14:10 — forked from alganet/c89cc.sh
c89cc.sh - standalone C89/ELF64 compiler in pure portable shell
#!/bin/sh
# ISC License
# Copyright (c) 2026 Alexandre Gomes Gaigalas <alganet@gmail.com>
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
@ontouchstart
ontouchstart / AzConsumptionUsageDetail.json
Created November 18, 2020 23:37
Get-AzConsumptionUsageDetail | Select-Object -Property InstanceName, ConsumedService, UsageQuantity, UsageStart, UsageEnd | Sort-Object -Property UsageQuantity | ConvertTo-Json | Out-File -Path /home/AzConsumptionUsageDetail.json
[
{
"InstanceName": "win2016VM",
"ConsumedService": "Microsoft.Compute",
"UsageQuantity": 0.000008,
"UsageStart": "2020-11-16T00:00:00Z",
"UsageEnd": "2020-11-16T23:59:59Z"
},
{
"InstanceName": "ontouchstart",
@ontouchstart
ontouchstart / AzConsumptionUsageDetail.json
Created November 18, 2020 23:27
Get-AzConsumptionUsageDetail | Select-Object -Property UsageQuantity, UsageStart, UsageEnd | Sort-Object -Property UsageQuantity | ConvertTo-Json | Out-File -Path /home/AzConsumptionUsageDetail.json
[
{
"UsageQuantity": 0.000008,
"UsageStart": "2020-11-16T00:00:00Z",
"UsageEnd": "2020-11-16T23:59:59Z"
},
{
"UsageQuantity": 0.000008,
"UsageStart": "2020-11-17T00:00:00Z",
"UsageEnd": "2020-11-17T23:59:59Z"