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
@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
  • 3月のライオン
    • 2016年10月8日(土)23:00
    • NHK
  • 響け!ユーフォニアム2
    • TOKYO MX1 10月5日より毎週水曜24:00~
    • ※初回1時間スペシャル
  • 舟を編む
    • 2016年10月13日(木)より
    • 24:55
  • フジテレビ
/** Declaration file generated by dts-gen */
export = tmp;
declare const tmp: {
children: {
children: {
data: {
hChildren: {
properties: {
className: string[];
@rhysd
rhysd / remark-test.js
Last active September 29, 2016 03:42
const fs = require('fs');
const parse = require('remark-parse');
const slug = require('remark-slug');
const headings = require('remark-autolink-headings');
const github = require('remark-github');
const toc = require('remark-toc');
const unified = require('unified');
function dump(processor, options) {
class Compiler {
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.

#!/usr/bin/env ruby -rfileutils
Dir["#{ENV['HOME']}/.vim/undo/*"]
.reject{|f| File.exists? File.basename(f).gsub('%', '/')}
.each{|f| FileUtils.remove_file f}
#!/usr/bin/env ruby
file = "#{ENV['HOME']}/.chpwd-recent-dirs"
File.write(
file,
File::foreach(file).select{|l| l =~ /^\$'(.*)'/ && Dir.exists?($1) }.join
)
use std::collections::HashMap;
use std::str::Chars;
use std::iter::Peekable;
use std::char;
#[derive(Debug)]
enum JsonValue {
Number(f64),
Boolean(bool),
String(String),
@rhysd
rhysd / google.js
Last active June 13, 2016 02:27
wdio suite usage?
$ npm install
$ ./node_modules/.bin/wdio --suite=test/google.js