Skip to content

Instantly share code, notes, and snippets.

View koron's full-sized avatar
🐱
meow

MURAOKA Taro koron

🐱
meow
View GitHub Profile
@koron
koron / golint.mak
Created January 24, 2017 00:21
golint with Makefile
GO_SUBPKGS = $(shell go list ./... | grep -v /vendor/ | sed -e "s!$$(go list)!.!")
lint:
@echo "golint"
@for f in $(GO_SUBPKGS) ; do golint $$f ; done
@echo ""
@koron
koron / python2-warn.diff
Last active January 15, 2017 02:46
https://github.com/vim-jp/issues/issues/1008 patch to warn when python2 is used in Vim
diff --git a/runtime/doc/if_pyth.txt b/runtime/doc/if_pyth.txt
index 5929bcf..d226bf2 100644
--- a/runtime/doc/if_pyth.txt
+++ b/runtime/doc/if_pyth.txt
@@ -811,5 +811,17 @@ dynamically, these has() calls will try to load them. If only one can be
loaded at a time, just checking if Python 2 or 3 are available will prevent
the other one from being available.
+
+ *:py2usingfrom*
@koron
koron / extract-sorted-params.go
Created November 29, 2016 06:17
golangのhttpクライアントがアクセスしたURLは、query paramsの順番がバラバラでわかりにくいので、それをソートしてLTSVに変換する。各行にURLがあれば変換したLTSVを、なければ空行を出力する。
package main
import (
"fmt"
"log"
"net/url"
"regexp"
"sort"
"github.com/koron/go-dia"
@koron
koron / bar.js
Last active November 15, 2016 16:21
'use strict';
const ITERATION = 100000000;
const DATA = [
'http://',
'ftp://',
'htts://',
'',
];
const FUNCS = [
#include <windows.h>
#include <stdio.h>
void readfile(HANDLE h, char *buf, int size) {
BOOL r;
DWORD nr;
int i;
r = ReadFile(h, buf, size, &nr, NULL);
printf("r=%d nr=%d", r, nr);
if (r != 0) {
let s='中華料理画像うpよろしく'
echom s
let a=split(s,'\zs')
let t=repeat('@',len(a)-2)
for b in map(a[1:-2],'v:val.t.a[-2-v:key]')
echom b
endfo
echom join(reverse(a),'')
let s='中華料理画像うpよろしく'|echom s|let a=split(s,'\zs')|let t=repeat('@',len(a)-2)|for b in map(a[1:-2],'v:val.t.a[-2-v:key]')|echom b|endfo|echom join(reverse(a),'')
bitbucket.org,104.192.143.1,104.192.143.2,104.192.143.3,104.192.143.65,104.192.143.66,104.192.143.67,2401:1d80:1010::150,2401:1d80:1010::151,2401:1d80:1010::152,2401:1d80:1003::150,2401:1d80:1003::151,2401:1d80:1003::152 ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAubiN81eDcafrgMeLzaFPsw2kNvEcqTKl/VqLat/MaB33pZy0y3rJZtnqwR2qOOvbwKZYKiEO1O6VqNEBxKvJJelCq0dTXWT5pbO2gDXC6h6QDXCaHo6pOHGPUy+YBaGQRGuSusMEASYiWunYN0vCAI8QaXnWMXNMdFP3jHAJH0eDsoiGnLPBlBp4TNm6rYI74nMzgz3B9IikW4WVK+dc8KZJZWYjAuORU3jc1c/NPskD2ASinf8v3xnfXeukU0sJ5N6m5E8VLjObPEO+mN2t/FZTMZLiFqPWc/ALSqnMnnhwrNi2rbfg/rd/IpL8Le3pSBne8+seeFVBoGqzHM9yXw==
@koron
koron / sources.list
Created August 3, 2016 13:16
Bash on Ubuntu on Windows の apt の設定 /etc/apt/sources.list はこうすべし。
deb mirror://mirrors.ubuntu.com/mirrors.txt trusty main restricted universe multiverse
deb mirror://mirrors.ubuntu.com/mirrors.txt trusty-updates main restricted universe multiverse
deb mirror://mirrors.ubuntu.com/mirrors.txt trusty-security main restricted universe multiverse
<div class="block">
<div class="element modifier">
</div>
</div>