Skip to content

Instantly share code, notes, and snippets.

Avatar
💩
ときどき引っかかって流れない( ・ั﹏・ั)

Harai Akihiro harai

💩
ときどき引っかかって流れない( ・ั﹏・ั)
View GitHub Profile
View gist:9049959
Apache Maven 3.0.4
Maven home: /usr/share/maven
Java version: 1.7.0_45, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-7-oracle/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "3.11.0-15-generic", arch: "amd64", family: "unix"
[INFO] Error stacktraces are turned on.
[DEBUG] Reading global settings from /usr/share/maven/conf/settings.xml
[DEBUG] Reading user settings from /home/jharai/.m2/settings.xml
[DEBUG] Using local repository at /home/jharai/.m2/repository
@harai
harai / gist:91c87437b18331e51a23
Last active Aug 29, 2015
ライフチェンジングなpercolとautojumpの紹介 - 404 Engineer Logs http://blog.zoncoen.net/blog/2014/01/14/percol-autojump-with-zsh/ のUbuntu 14.04対応版
View gist:91c87437b18331e51a23
function exists { which $1 &> /dev/null }
if exists percol; then
function percol_select_history() {
local tac
BUFFER=$(history | sed -e "s/^\\s*[0-9]*\\s*\\*\?\\s*//g" | tac | percol --query "$LBUFFER")
CURSOR=$#BUFFER # move cursor
zle -R -c # refresh
}
View crontab
SHELL=/usr/bin/zsh
HOME=/home/jharai
PATH=/home/jharai/bin:/home/jharai/.rbenv/shims:/bin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin
@harai
harai / backlog2md.user.js
Last active Aug 29, 2015
Convert Backlog™ notation to Markdown.
View backlog2md.user.js
// ==UserScript==
// @name Backlog™2Markdown
// @namespace https://github.com/harai/
// @description Convert Backlog™ notation to Markdown.
// @include https://*.backlog.jp/*
// @version 1.0.1
// ==/UserScript==
//
// Copyright (C) 2015 Akihiro HARAI
// Originally created by edvakf
@harai
harai / gigasort.rb
Created Jun 20, 2015
10GBの数値データをソートするプログラム
View gigasort.rb
require 'securerandom'
INIT_CHUNK_LINES = 10000000
WRITE_CHUNK_LINES = 1000000
def find_smallest_pair(path)
files = Dir["#{path}/*"].sort_by do |f|
File.size(f)
end
if files.size < 2
@harai
harai / suii
Created Jun 8, 2012 — forked from anonymous/suii
野菜の栄養価の推移
View suii
キャベツ, 水分(g), カルシウム(mg), 鉄(mg), A(IU), B1(mg), B2(mg), C(mg)
1947, 94.5, 9, 3 , 10, 0.08, 0.16, 40
1950, 94.4, 9, 3 , 0, 0.08, 0.30, 40
1954, 94.4, 47, 0.4, 0, 0.08, 0.30, 40
1963, 92.3, 45, 0.4, 100, 0.08, 0.05, 50
1982, 92.4, 43, 0.4, 5, 0.05, 0.05, 44
2000, 92.7, 43, 0.3, 14, 0.04, 0.03, 41
2010, 92.7, 43, 0.3, 14, 0.04, 0.03, 41
たまねぎ, 水分, カルシウム, 鉄, A, B1, B2, C
@harai
harai / gist:3942771
Created Oct 24, 2012
refinerycms Error
View gist:3942771
$ refinerycms rickrockstar
create
create README.rdoc
create Rakefile
create config.ru
create .gitignore
create Gemfile
create app
create app/assets/images/rails.png
create app/assets/javascripts/application.js
View gist:3956013
$ pry
[1] pry(main)> $:.sort
=> ["/home/jharai/.rvm/gems/ruby-1.9.3-p0/gems/coderay-1.0.7/lib",
"/home/jharai/.rvm/gems/ruby-1.9.3-p0/gems/method_source-0.8/lib",
"/home/jharai/.rvm/gems/ruby-1.9.3-p0/gems/pry-0.9.10/lib",
"/home/jharai/.rvm/gems/ruby-1.9.3-p0/gems/pry-doc-0.4.4/lib",
"/home/jharai/.rvm/gems/ruby-1.9.3-p0/gems/rb-readline-0.4.2/lib",
"/home/jharai/.rvm/gems/ruby-1.9.3-p0/gems/slop-3.3.3/lib",
"/home/jharai/.rvm/gems/ruby-1.9.3-p0/gems/yard-0.8.2.1/lib",
"/home/jharai/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1",
@harai
harai / Dockerfile
Created Nov 5, 2015
Dockerfile which starts Google Chrome
View Dockerfile
FROM ubuntu:14.04
#
# Usage:
# docker build -t chrome .
# docker run -ti --rm -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix chrome
#
# Created originally by:
# http://fabiorehm.com/blog/2014/09/11/running-gui-apps-with-docker/
#
@harai
harai / inbox-title-patch.user.js
Created Nov 24, 2015
Title patch for Inbox by Gmail™
View inbox-title-patch.user.js
// ==UserScript==
// @name Title patch for Inbox by Gmail™
// @namespace com.github.harai
// @description Count unread messages and display it as the page's title.
// @include https://inbox.google.com/*
// @version 1
// @grant none
// ==/UserScript==
setInterval(function() {
You can’t perform that action at this time.