$ uname -a
Linux docker-desktop 5.15.133.1-microsoft-standard-WSL2 #1 SMP Thu Oct 5 21:02:42 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
$ node --version
v20.14.0
$ node mem.js
before write: rss: 40.05MB, heapTotal: 4.20MB, heapUsed: 3.53MB, external: 1.33MB
writing 0: rss: 42.77MB, heapTotal: 4.45MB, heapUsed: 3.87MB, external: 1.45MB
This file contains 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
//> using scala 3.3.1 | |
//> using toolkit default | |
import os.RelPath | |
import upickle.default.* | |
opaque type PackageName = String | |
opaque type PackageVersion = String | |
opaque type Severity = String | |
opaque type ModulePath = String |
This file contains 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
// ==UserScript== | |
// @name Toggl - Quick import | |
// @description (<mm><dd> )?(<hh><mm>(<description><hh><mm>)+ )+ | |
// @namespace https://github.com/unarist/ | |
// @version 0.1 | |
// @author unarist | |
// @match https://www.toggl.com/app/timer | |
// @grant GM_registerMenuCommand | |
// @downloadURL https://gist.github.com/unarist/559e02233b5e5dc4859885041c076190/raw/toggl-quickimport.user.js | |
// ==/UserScript== |
This file contains 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
// structures are based on https://github.com/dotnet/runtime/blob/v6.0.7/src/libraries/System.Text.Encoding.CodePages/src/System/Text/BaseCodePageEncoding.cs | |
struct CodePageHeader { | |
char16 codePageName[16]; | |
u16 version[4]; | |
u16 codePage; | |
u16 byteCount; | |
u32 offset; | |
u16 unicodeReplace; | |
u16 byteReplace; |
This file contains 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
<ol> | |
<li>音声ファイルを選ぶ: <input type="file"></li> | |
<li><button>connect</button> を押してSpaceMouseを選んで接続する</li> | |
<li>押すと光って音がなる(Windowsとかだと Stop 3DxWare してからやるといい感じ)</li> | |
</ol> | |
<script> | |
let audioUrl = undefined; | |
document.querySelector('input').onchange = ({target}) => { | |
const file = target.files[0]; | |
audioUrl = file ? URL.createObjectURL(file) : undefined; |
This file contains 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
<!-- inspired by https://nondebug.github.io/webhid-explorer/ --> | |
<!-- license: CC0 --> | |
<button>Connect HID device</button> | |
<script> | |
const t = (e,p) => Object.assign(document.createElement(e), p); | |
const addSection = (title) => { | |
const header = t("h3", {textContent: title}); | |
const textarea = t("textarea", { |
This file contains 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
open System | |
open System.Windows.Automation | |
module Screen = | |
open System.Windows.Forms | |
open System.Drawing | |
let workingAreaFor (rect: System.Windows.Rect) = | |
let rect = new Rectangle(int rect.X, int rect.Y, int rect.Width, int rect.Height) | |
let workingArea = (Screen.FromRectangle rect).WorkingArea | |
new System.Windows.Rect(float workingArea.X, float workingArea.Y, float workingArea.Width, float workingArea.Height) |
This file contains 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
// ==UserScript== | |
// @name github - indent lines | |
// @namespace https://github.com/unarist/ | |
// @version 0.1 | |
// @description Tab/Shift+Tabでカーソル位置・選択行をインデント・アンインデント | |
// @author unarist | |
// @match https://github.com/* | |
// @grant none | |
// @downloadURL https://gist.github.com/unarist/a184bf5d936c82bed14007a56e8abfae/raw/github-indent-lines.user.js | |
// @run-at document-idle |
This file contains 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 { DOMParser, Element } from "https://deno.land/x/[email protected]/deno-dom-wasm.ts"; | |
// https://github.com/ietf-wg-cellar/ebml-specification/blob/master/specification.markdown#ebml-header-elements | |
let elementDefs = [ | |
{ path: "\\EBML", id: 0x1A45DFA3, type: "master" }, | |
{ path: "\\EBML\\EBMLVersion", id: 0x4286, type: "uinteger" }, | |
{ path: "\\EBML\\EBMLReadVersion", id: 0x42F7, type: "uinteger" }, | |
{ path: "\\EBML\\EBMLMaxIDLength", id: 0x42F2, type: "uinteger" }, | |
{ path: "\\EBML\\EBMLMaxSizeLength", id: 0x42F3, type: "uinteger" }, | |
{ path: "\\EBML\\DocType", id: 0x4282, type: "string" }, |
This file contains 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
// ==UserScript== | |
// @name gh - show approvals | |
// @namespace https://github.com/unarist | |
// @version 0.3 | |
// @author unarist | |
// @match https://github.com/* | |
// @grant none | |
// @downloadURL https://gist.github.com/unarist/c45bd5e8102afe7ce27d757a87819ea4/raw/github-show-approvals.user.js | |
// @run-at document-idle | |
// @noframes |
NewerOlder