Skip to content

Instantly share code, notes, and snippets.

View rhysd's full-sized avatar
🐕
Fixing an off-by-wan error

Linda_pp rhysd

🐕
Fixing an off-by-wan error
View GitHub Profile
function peco-repos() {
local input
input="$(find "$GOPATH/src" -maxdepth 3 -mindepth 3 -name "*" -type d)"
input="${input}\n$(ghq list | sed "s#^#$(ghq root)/#")"
input="${input}\n$(ls -1 -d "$HOME/.vim/bundle/"*)"
input="${input}\n$(ls -1 -d "$HOME/.cache/dein/repos/"*)"
input="$(echo "$input" | sed "s#^$HOME#~#g")"
local selected_dir=$(echo "${input}" | peco --prompt 'repos >' --query "$LBUFFER")
diff --git a/target/elc.c b/target/elc.c
index 80b08c9..030a5f8 100644
--- a/target/elc.c
+++ b/target/elc.c
@@ -12,6 +12,7 @@ void target_js(Module* module);
void target_php(Module* module);
void target_el(Module* module);
void target_vim(Module* module);
+void target_viml(Module* module);
void target_tex(Module* module);
// https://wicg.github.io/IntersectionObserver/#intersection-observer-private-slots
/*
callback IntersectionObserverCallback = void (sequence<IntersectionObserverEntry> entries, IntersectionObserver observer)
[Constructor(IntersectionObserverCallback callback, optional IntersectionObserverInit options),
Exposed=Window]
interface IntersectionObserver {
readonly attribute Element? root;
readonly attribute DOMString rootMargin;
@rhysd
rhysd / foo.d.ts
Last active November 22, 2016 11:10
/// <reference types="node" />
import * as stream from 'stream';
export declare default function hogehoge(): stream.Transform;
@rhysd
rhysd / foo.vim
Last active November 19, 2016 17:02
function! s:fold(list, init, pred) abort
let acc = a:init
for item in a:list
let acc = a:pred(acc, item)
endfor
return acc
endfunction
echo s:fold([1, 2, 3, 4, 5], 0, {acc, i -> acc + i})

NES emulator development guide

Overview of document

@rhysd
rhysd / vimrc.diff
Last active November 11, 2016 18:39
行指定ジャンプするついでにちょっと行番号も見れるやつ
@@ -441,7 +443,15 @@ noremap gm m
"Esc->Escで検索結果とエラーハイライトをクリア
nnoremap <silent><Esc><Esc> :<C-u>nohlsearch<CR>
"{数値}<Tab>でその行へ移動.それ以外だと通常の<Tab>の動きに
-noremap <expr><Tab> v:count != 0 ? "G" : "\<Tab>zvzz"
+function! s:go_to_line(lnum) abort
+ set number
+ augroup vimrc-go-to-line
+ autocmd!
+ autocmd InsertEnter,CursorHold * set nonumber | autocmd! vimrc-go-to-line
/** Declaration file generated by dts-gen */
export = tmp;
declare const tmp: {
children: {
children: {
data: {
hChildren: {
properties: {
className: string[];
This file has been truncated, but you can view the full file.
{
"type": "root",
"children": [
{
"type": "heading",
"depth": 1,
"children": [
{
"type": "link",
"url": "#this-is-test-for-markdown-text",

This is test for markdown text

Table of Contents

AT&T has an ampersand in their name.

AT&T is another way to write it.

This & that.