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
{ | |
description = "A very basic flake"; | |
inputs = { | |
home-manager.inputs.nixpkgs.follows = "nixpkgs"; | |
home-manager.url = "github:nix-community/home-manager"; | |
kuusay.inputs.nixpkgs.follows = "nixpkgs"; | |
kuusay.url = "github:times-yasunori/kuusay"; | |
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable"; | |
}; |
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
let s:contain_lines = v:false | |
function! s:open() abort range | |
GinCd | |
let file = expand('%:.') | |
if a:firstline == a:lastline | |
let line = printf('L%d', a:firstline) | |
else | |
let line = printf('L%d+%d', a:firstline, a:lastline - a:firstline) | |
endif |
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
# Edit this configuration file to define what should be installed on | |
# your system. Help is available in the configuration.nix(5) man page, on | |
# https://search.nixos.org/options and in the NixOS manual (`nixos-help`). | |
{ | |
config, | |
lib, | |
pkgs, | |
... | |
}: |
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 { | |
BaseFilter, | |
FilterArguments, | |
} from "https://deno.land/x/[email protected]/base/filter.ts"; | |
import { Context, DduItem } from "https://deno.land/x/[email protected]/types.ts"; | |
type Never = Record<PropertyKey, never>; | |
export class Filter extends BaseFilter<Never> { | |
#cache = new WeakMap<Context, Map<string, number>>(); |
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
" ws以外の全ての関数は[result, newpos]を返す | |
function! s:object(in, pos) abort | |
let p = s:ws(a:in, a:pos + 1) | |
if a:in[p] == 125 " } | |
return [{}, p + 1] | |
endif | |
let acc = {} | |
while v:true | |
let [r, p] = s:member(a:in, p) |
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 * as u from "https://deno.land/x/[email protected]/mod.ts"; | |
import { is } from "https://deno.land/x/[email protected]/mod.ts"; | |
type Point = { | |
x: number; | |
y: number; | |
}; | |
type Rect = Point & { | |
width: number; |
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
#!/bin/bash -u | |
touch /tmp/clip | |
wezterm start --class Floaterm nvim /tmp/clip || exit 1 # Vimが正しく終了しなかった時はコピーしない | |
# head -c -1は末尾の改行を削ぎ落とすやつ | |
head -c -1 /tmp/clip | xclip -selection clipboard | |
notify-send -t 1000 copied |
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
#!/bin/bash -u | |
if [[ $(id -u) != 0 ]]; then | |
exec sudo $0 $@ | |
fi | |
base=/tmp/archbase | |
root=/tmp/archroot | |
mkdir -p /tmp/gen |
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
function! BF(fxxk) abort | |
let mem = 0z00 | |
for i in range(15) | |
let mem = mem + mem | |
endfor | |
let ip = 0 | |
let dp = 0 | |
let out = [] | |
while ip < len(a:fxxk) | |
let c = a:fxxk[ip] |
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
" 括弧を収集 | |
function! s:collect() abort | |
let view = winsaveview() | |
let pairs = [] | |
call cursor([1, 1]) | |
if search('(\|)', 'cW') | |
call add(pairs, [getline('.')[col('.')-1], [line('.'), col('.')]]) | |
endif | |
while search('(\|)', 'W') |
NewerOlder