Skip to content

Instantly share code, notes, and snippets.

hoge

fuga

# complement
autoload -Uz compinit
compinit
zstyle ':completion:*:default' menu select=2
# 補完で小文字でも大文字にマッチさせる
zstyle ':completion:*' matcher-list 'm:{a-z}={A-Z}'
# ../ の後は今いるディレクトリを補完しない
zstyle ':completion:*' ignore-parents parent pwd ..
#!/bin/sh
set -e
if [ ! `which envchain` ]; then
echo 'envchain not found'
exit 1
fi
if [ $# -ne 1 ]; then
@itkq
itkq / latexit
Last active October 27, 2016 14:37
Latexit CLI
#!/usr/bin/env ruby
WORK_DIR = ENV['HOME']+'/tmp/latexit/'
FILE_NAME = 'tmp'
eq = `pbpaste`.strip
if eq.size > 100
puts 'Number of characters should be less than 100'
exit 1
end
@itkq
itkq / average.js
Created September 28, 2016 09:29
教務Webで平均点計算
c=0;s=0;Array.prototype.forEach.call(document.querySelectorAll('.tableSet01 tr'),function(e,i){t=e.childNodes[6].innerText;if(isFinite(t)){s+=Number(t);c++}});alert(s/c);
%%
%% IEEEtran.cls 2015/08/26 version V1.8b
%%
%% This is the IEEEtran LaTeX class for authors of the Institute of
%% Electrical and Electronics Engineers (IEEE) Transactions journals and
%% conferences.
%%
%% Support sites:
%% http://www.michaelshell.org/tex/ieeetran/
%% http://www.ctan.org/pkg/ieeetran
%%%
%% ieicej.cls (pLaTeX2e)
%% for the Transactions of the Institute of Electronics, Information
%% and Communication Engineers by ULS and Company, 1999-2015.
%% E-mail: ieice-div@uls.co.jp, teppei@uls.co.jp
\NeedsTeXFormat{pLaTeX2e}
\ProvidesClass{ieicej}
%%[1999/04/28 v1.0 for Transactions of IEICE]
%%[1999/07/12 v1.0 new release for Transactions of IEICE]
%%[2000/11/02 v1.1 for Transactions of IEICE]
@itkq
itkq / Gemfile
Last active September 7, 2016 09:50
東工大修士向け2016年度3Q/4Qの文系選択を支援するやつ
# frozen_string_literal: true
# A sample Gemfile
source "https://rubygems.org"
gem "mechanize"
#!/usr/bin/env bash
MACHINE=default
IMAGE=texlive2015
if docker-machine ls | grep $MACHINE | grep -q "Runnning"; then
docker-machine start $MACHINE
fi
docker ps 2> /dev/null
if [ $? -ne 0 ]; then
eval $(docker-machine env $MACHINE)
for f in test/*.in ; do ; diff <(cat $f | ./a.out) ${f%.in}.out ; done