Skip to content

Instantly share code, notes, and snippets.

View 4513ECHO's full-sized avatar

Hibiki 4513ECHO

View GitHub Profile
@4513ECHO
4513ECHO / graph.ts
Created August 26, 2024 06:08
Visualize dependency graph of deno
import { createGraph } from "jsr:@deno/graph@^0.81.3";
import { relative } from "jsr:@std/path@^1.0.2/relative";
import { resolve } from "jsr:@std/path@^1.0.2/resolve";
import { toFileUrl } from "jsr:@std/path@^1.0.2/to-file-url";
import { digraph, toDot } from "npm:ts-graphviz@^2.1.2";
const [entrypoint, baseDir] = Deno.args;
const graph = await createGraph(
toFileUrl(resolve(entrypoint)).href,
#!/usr/bin/env -S deno run --allow-read=.,/etc/ssh/sshd_config --allow-write=/etc/ssh/sshd_config
import { parseArgs } from "https://deno.land/[email protected]/cli/parse_args.ts";
import { TextLineStream } from "https://deno.land/[email protected]/streams/text_line_stream.ts";
import { ensure, is } from "https://deno.land/x/[email protected]/mod.ts";
/* Usage:
* ./sshd_config.ts --config=<FILE> [--dry-run] [--sshd-config=<FILE>]
* --config=<FILE> Path to the JSON file containing the sshd_config options
* --dry-run Do not write to the sshd_config file (default: false)
* --sshd-config=<FILE> Path to the sshd_config file (default: /etc/ssh/sshd_config)
@4513ECHO
4513ECHO / custom-settings.json
Created January 31, 2024 10:50
CommitMono custom settings
{"weight":400,"italic":false,"alternates":{"cv01":false,"cv02":true,"cv03":false,"cv04":false,"cv05":false,"cv06":true,"cv07":false,"cv08":true,"cv09":false,"cv10":false,"cv11":false},"features":{"ss01":false,"ss02":false,"ss03":true,"ss04":true,"ss05":true},"letterSpacing":0,"lineHeight":1}
import { CsvParseStream } from "https://deno.land/[email protected]/csv/csv_parse_stream.ts";
const file = await Deno.open("data.csv");
const stream = file.readable
.pipeThrough(new TextDecoderStream("shift-jis"))
.pipeThrough(new CsvParseStream());
for await (const record of stream) {
console.log(record);
}
https://github.com/4513ECHO/dotfiles/blob/main/config/nvim/after/ftplugin/help.vim
https://github.com/4513ECHO/dotfiles/blob/main/config/nvim/after/syntax/diff.vim
https://github.com/4513ECHO/dotfiles/blob/main/config/nvim/after/syntax/json.vim
https://github.com/4513ECHO/dotfiles/blob/main/config/nvim/after/syntax/vim.vim
https://github.com/4513ECHO/dotfiles/blob/main/config/nvim/autoload/lightline/colorscheme/mini.vim
https://github.com/4513ECHO/dotfiles/blob/main/config/nvim/autoload/lightline/component/vimrc.vim
https://github.com/4513ECHO/dotfiles/blob/main/config/nvim/autoload/pinkyless/keyboard/JIS.vim
https://github.com/4513ECHO/dotfiles/blob/main/config/nvim/autoload/quickrun/hook/denops_interrupt.vim
https://github.com/4513ECHO/dotfiles/blob/main/config/nvim/autoload/user.vim
https://github.com/4513ECHO/dotfiles/blob/main/config/nvim/autoload/user/colorscheme.vim
set rtp^=~/.cache/nvim/dein/repos/github.com/vim-denops/denops.vim
set rtp^=~/.cache/nvim/dein/repos/github.com/vim-skk/skkeleton
set rtp^=~/.cache/nvim/dein/repos/github.com/Shougo/pum.vim
set rtp^=~/.cache/nvim/dein/repos/github.com/Shougo/ddc.vim
set rtp^=~/.cache/nvim/dein/repos/github.com/Shougo/ddc-ui-pum
inoremap <C-j> <Plug>(skkeleton-toggle)
inoremap <C-n> <Cmd>call pum#map#select_relative(+1)<CR>
call skkeleton#config(#{
set rtp^=~/.cache/nvim/dein/repos/github.com/Shougo/pum.vim
let g:lines = []
autocmd CmdlineChanged * call add(g:lines, getcmdline())
call feedkeys(':')
call timer_start(100, { -> pum#open(getcmdpos(), [#{ word: 'foo' }]) })
call timer_start(200, { -> pum#map#select_relative(+1) })
call timer_start(300, { -> pum#map#confirm() })
" call timer_start(400, { -> feedkeys("\<C-u>\<CR>") })
call timer_start(500, { -> execute('echomsg g:lines', '') })
import type { Denops } from "https://deno.land/x/[email protected]/mod.ts";
import { batch } from "https://deno.land/x/[email protected]/batch/mod.ts";
import { modifiable } from "https://deno.land/x/[email protected]/buffer/mod.ts";
export function main(denops: Denops): void {
denops.dispatcher = {
async modifiableTest(): Promise<void> {
await batch(denops, async (denops) => {
await modifiable(
denops,