View toggl-quickimport.user.js
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== |
View codepages_nlp.hexpat
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; |
View index.html
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; |
View hid-inputs-viewer.html
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", { |
View autoresize.fs
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) |
View github-indent-lines.user.js
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 |
View parse-ebml.ts
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/deno_dom@v0.1.3-alpha2/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" }, |
View github-show-approvals.user.js
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 |
View mastodon-min_id-autoscroll.user.js
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 Mastodon - Jump to the bottom on min_id pages | |
// @namespace https://github.com/unarist/ | |
// @version 0.1 | |
// @author unarist | |
// @match https://*/@* | |
// @downloadURL https://gist.github.com/unarist/654da43b13108d30d6dbb602e42cd6d8/raw/mastodon-min_id-autoscroll.user.js | |
// @grant none | |
// @noframes | |
// @run-at document-idle |
View github-lightbox.user.js
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 - lightbox | |
// @namespace https://github.com/unarist/ | |
// @version 0.1 | |
// @author unarist | |
// @match https://github.com/*/*/issues/* | |
// @match https://github.com/*/*/pull/* | |
// @grant none | |
// @downloadURL https://gist.github.com/unarist/982dcff096062f53406bf0ab5d470744/raw/github-lightbox.user.js | |
// @license MIT License |
NewerOlder