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
(use data.random) | |
(use gauche.generator) | |
(use srfi-1) | |
(use util.match) | |
; DEBUG {{{ | |
(define (display-line obj . port) | |
(let ((port (if (null? port) (current-output-port) port))) | |
(display obj port) |
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
<script> | |
let indent = 0; | |
function redraw() { | |
const dom = document.querySelector('span'); | |
dom.innerHTML = ' '.repeat(indent); | |
} | |
function handle() { | |
const dom = document.querySelector('input'); | |
if(dom.selectionStart === 0) { |
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
let s:maps = {} | |
function! HyperMap(from, to) abort | |
let key = a:from[-1:] | |
let prefix = a:from[:-2] | |
let map = get(s:maps, key, {}) | |
let s:maps[key] = map | |
let map[prefix] = {'mapto': a:to, 'eval': v:false} | |
execute 'inoremap' '<expr>' key 'HyperResolve("' .. key .. '")' |
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 { createHash } from "https://deno.land/[email protected]/hash/mod.ts"; | |
import { ensureDirSync } from "https://deno.land/[email protected]/fs/ensure_dir.ts"; | |
import { walkSync } from "https://deno.land/[email protected]/fs/walk.ts"; | |
/* | |
* Deno cache injector | |
* cache algorithm is referenced from Deno source | |
* https://github.com/denoland/deno/blob/main/cli/disk_cache.rs | |
* https://github.com/denoland/deno/blob/main/cli/deno_dir.rs | |
* |
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 subprocess | |
from ctypes import * | |
subprocess.call(['sync','c']) | |
p = byref(c_byte()) | |
rt = windll.ntdll.RtlAdjustPrivilege(19, True, False, p) | |
print(windll.ntdll.NtShutdownSystem(2)) |
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
function! s:test() abort | |
let oldline = get(b:, 'test', -1) | |
let curline = line('w0') | |
if oldline != curline | |
echomsg curline | |
let b:test = curline | |
endif | |
endfunction | |
augroup mytest |
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 { BufReader } from "https://deno.land/[email protected]/io/bufio.ts"; | |
const stdin = BufReader.create(Deno.stdin); | |
const decoder = new TextDecoder("utf-8", {fatal: true}); | |
const encoder = new TextEncoder(); | |
const colors = [ | |
[128, 255, 128], | |
[128, 128, 255], |
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
<?xml version="1.0"?> | |
<!DOCTYPE fontconfig SYSTEM "fonts.dtd"> | |
<fontconfig> | |
<!-- monospace --> | |
<match target="pattern"> | |
<test qual="any" name="family"><string>monospace</string></test> | |
<edit name="family" mode="prepend" binding="same"><string>Noto Sans Mono</string></edit> | |
<edit name="family" mode="append" binding="same"><string>Noto Sans Mono CJK JP</string></edit> | |
</match> | |
<!-- sans-serif --> |
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
function! kana#init() abort | |
let s:state = {} | |
let s:state.preedit = "" | |
let s:state.preedit_next = "" | |
let s:state.kakutei = v:false | |
let s:state.feed = "" | |
let s:table = json_decode(join(readfile("table.json"), "")) | |
call kana#map() | |
endfunction |
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 -u | |
go mod init hoge | |
GOOS=js GOARCH=wasm go build -v -o main.wasm |