Skip to content

Instantly share code, notes, and snippets.

@tanaka51
tanaka51 / set_authorized_keys.sh
Last active August 29, 2015 14:01
set everyleaf members public kyes to ~/.ssh/authorized_keys
#! /bin/sh
users=(nay kuko den8 tatsuo hassaku ksbmyk kyuden n-sakuma publichtml redfit upinetree yakitorii yorimitsu yoshihara tanaka51-jp uu59)
for user in ${users[@]}; do
echo Set $user public keyes...
curl -s https://github.com/$user.keys >> ~/.ssh/authorized_keys
done
@tanaka51
tanaka51 / vimrc
Last active December 31, 2015 14:38
set nocompatible
filetype off
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'altercation/vim-colors-solarized'
Plugin 'bronson/vim-trailing-whitespace'
Plugin 'ctrlpvim/ctrlp.vim'
Plugin 'tacahiroy/ctrlp-funky'
@tanaka51
tanaka51 / main.go
Last active December 26, 2015 05:29
share a variable between some goroutines
package main
import (
"fmt"
"math/rand"
"sync"
"time"
)
const (
@tanaka51
tanaka51 / mugicha.el
Last active December 22, 2015 10:28
Emacs meets tmux!
;;; mugicha.el --- Emacs meets tmux!
;; Author: Koichi TANAKA <tanaka51.jp@gmail.com>
;; This file is *NOT* part of GNU Emacs.
;;; Code:
(eval-when-compile (require 'cl))
(defgroup mugicha nil
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x0000000101585181, pid=636, tid=3871
#
# JRE version: 7.0_25-b15
# Java VM: Java HotSpot(TM) 64-Bit Server VM (23.25-b01 mixed mode bsd-amd64 compressed oops)
# Problematic frame:
# V [libjvm.dylib+0x2a7181]
#
@tanaka51
tanaka51 / find-cp
Created June 21, 2013 09:34
find-cp png jpg -o ~/path/to/directory
#!/usr/bin/env ruby
require 'fileutils'; include FileUtils
require 'optparse'
dest_path = ""
noop = ""
opt = OptionParser.new
opt.on('-o VAL') {|v| dest_path = v }
opt.on('-d', '--dry-run') {|v| noop = v }
@tanaka51
tanaka51 / pr.md
Created April 22, 2013 10:29 — forked from piscisaureus/pr.md

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

@tanaka51
tanaka51 / get_emoj.js
Created October 2, 2012 07:55
Getting emoji-code and img from using on http://www.emoji-cheat-sheet.com/
var url = "http://www.emoji-cheat-sheet.com/"
var imgs_code = "";
$('span.emoji').each(function(){
imgs_code = imgs_code + "\n" + url + $(this).data('src') + " - " + $(this).parent().text();
});
alert(imgs_code);
@tanaka51
tanaka51 / get_emoj.js
Created October 2, 2012 07:40
Getting emoji code from using on http://www.emoji-cheat-sheet.com/
var emojis = "";
$('span.emoji').each(function(){
emojis = emojis + " " + $(this).parent().text();
});
alert(emojis);
@tanaka51
tanaka51 / shibuya-el-position-paper.md
Created August 24, 2012 00:26 — forked from ainame/shibuya-el-position-paper.md
shibuya.elのポジションペーパーです。githubアカウントをお持ちの方はforkしてお使いください。

Shibuya.el#1 ポジションペーパー

Personal

  • 名前(任意)

    • 田中 光一
  • Twitter

  • @tanaka51