This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!doctype html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="utf-8"> | |
| <title>Perlin noise flow field — GPU edition</title> | |
| <meta name="viewport" content="width=device-width, initial-scale=1"> | |
| <link rel="shortcut icon" type="image/x-icon" href="data:image/x-icon;,"> | |
| <style> | |
| html, body { width: 100%; height: 100%; padding: 0; margin: 0; background: #0a0a0a; overflow: hidden; | |
| font-family: ui-monospace, "JetBrains Mono", "SF Mono", Menlo, monospace; color: #cfcfd6; } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # isolated ai environments | |
| # usage: | |
| # podman build -t docker-ai . --no-cache | |
| # or | |
| # docker build -t docker-ai . --no-cache | |
| # | |
| # testet on macos with docker running as root | |
| # testet on nixos with rootless podman | |
| FROM ubuntu:24.04 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| set -e | |
| APP_DIR="$HOME/Applications/BrowserRouter.app" | |
| # Compile the AppleScript into an application | |
| osacompile -o "$APP_DIR" << 'APPLESCRIPT' | |
| use AppleScript version "2.4" | |
| use scripting additions |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| set -eo pipefail | |
| # ----------------------- | |
| # Raspberry PI guitar rig | |
| # ----------------------- | |
| # functions to log statements in color | |
| g="\033[32m" | |
| r="\033[31m" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| async function typedFetch<T>(): Promise<T> { | |
| let res = await fetch("http://ip.jsontest.com/"); | |
| let json = res.json(); | |
| return json; // actually Promise<any> | |
| } | |
| type Ip = { ip: String }; | |
| (async function () { | |
| let ip = await typedFetch<Ip>(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| description = "minimal nix flake with a default package"; | |
| inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; | |
| outputs = { self, nixpkgs }: { | |
| # packages.x86_64-linux.default = | |
| # with nixpkgs.legacyPackages.x86_64-linux; | |
| packages.aarch64-darwin.default = |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (async function () { | |
| var webHookUrl = "https://hooks.slack.com/triggers/a/b/c"; | |
| // credits chatgpt | |
| function isoWeek(date) { | |
| // copy date so don't modify original | |
| date = new Date(date); | |
| // set to nearest thursday (current date + 4 - current day) % 7 | |
| date.setUTCDate(date.getUTCDate() + 4 - (date.getUTCDay() || 7)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.lang.reflect.InvocationHandler; | |
| import java.lang.reflect.Method; | |
| import java.lang.reflect.Proxy; | |
| class DynamicInvocationHandler implements InvocationHandler { | |
| @Override | |
| public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { | |
| return 42; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # one: string | |
| #INSERT INTO `torgeirtester.schema_one` values ("one"); | |
| # one: string, two: number | |
| #INSERT INTO `torgeirtester.schema_two` values ("one", 2); | |
| # three: boolean | |
| #INSERT INTO `torgeirtester.schema_three` values (true); | |
| SELECT * FROM `torgeirtester.schema_*`; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| tar xvfz Tomb-2.9.tar.gz | |
| cd Tomb-2.9 | |
| sudo make install | |
| # 300MB disk | |
| tomb dig -s 300 locked.tomb | |
| tomb forge locked.tomb.key | |
NewerOlder