Skip to content

Instantly share code, notes, and snippets.

@itkq
itkq / docker-compose.yml
Created March 8, 2017 09:16
Dockerized Zabbix 2.4
version: '2'
services:
db-data:
image: busybox:latest
volumes:
- /var/lib/mysql
zabbix-db:
image: monitoringartist/zabbix-db-mariadb
environment:
- MARIADB_USER=zabbix
# ==== Emojis ====
# 🎨 :art: Improving structure / format of the code.
# ⚡️ :zap: Improving performance.
# 🔥 :fire: Removing code or files.
# 🐛 :bug: Fixing a bug.
# 🚑 :ambulance: Critical hotfix.
# ✨ :sparkles: Introducing new features.
# 📝 :memo: Writing docs.
# 🚀 :rocket: Deploying stuff.

hoge

fuga

#!/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: [email protected], [email protected]
\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)