Skip to content

Instantly share code, notes, and snippets.

Kazuhiro Homma kazuph

Block or report user

Report or block kazuph

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
kazuph / Dockerfile
Last active Feb 9, 2020
View Dockerfile
FROM centos
RUN yum install -y passwd
RUN yum install -y openssh
RUN yum install -y openssh-server
RUN yum install -y openssh-clients
RUN yum install -y sudo
RUN sed -ri 's/UsePAM yes/#UsePAM yes/g' /etc/ssh/sshd_config
RUN sed -ri 's/#UsePAM no/UsePAM no/g' /etc/ssh/sshd_config
kazuph / script.js
Created Oct 24, 2019
Chrome Extension Script Auto RunnerでSafari(O'Reilly)が日本語に翻訳されたあともNext/Prev/目次のリンクを有効にする
View script.js
// load "//"
let rebindClickEvent = () => {
$('').on('click', () => location.href = $('')[0].href );
$('a.prev').on('click', () => location.href = $('a.prev')[0].href );
$('li.toc-level1').map((i, li) => {
$(li).on('click', () => location.href = $(li).children()[0].href )
setTimeout(rebindClickEvent, 1000 * 5);
kazuph /
Last active Oct 3, 2019
kazuph / esa2esa.rb
Last active Mar 23, 2017
View esa2esa.rb
#!/usr/bin/env ruby
# coding : utf-8
require 'esa'
require 'yaml'
class Importer
attr_accessor :client, :files
def initialize(client, dir_path)
@client = client
kazuph / .bash_profile
Last active Feb 2, 2017
cronからbundle exec...はsu - <USER> -lc ...が一番便利 ref:
View .bash_profile
export PATH="$HOME/.rbenv/bin:$PATH"
eval "$(rbenv init -)"
View puma
# puma - this script starts and stops the puma daemon
# chkconfig: - 85 15
# description: Description \
# goes here...
# processname: puma
# config: /etc/puma.conf
# pidfile: /home/stanislaw/apps/micro-apps/puma/
kazuph / file0.txt
Last active Dec 19, 2016
iPhoneアプリに必要なアイコンを全サイズ生成するシェルスクリプト ref:
View file0.txt
$ brew install ImageMagick
View .vimrc
"dein Scripts-----------------------------
if &compatible
set nocompatible " Be iMproved
" Required:
set runtimepath^=/home/pi/.dein/repos/
" Required:
call dein#begin(expand('/home/pi/.dein'))
kazuph / api.rb
Created Jan 28, 2014
grape-swaggerでgrapeでつくったAPIのドキュメントを自動生成する ref:
View api.rb
desc "Reserve a virgin in heaven", {
:notes => <<-NOTE
Virgins in heaven
> A virgin doesn't come for free
If you want to reserve a virgin in heaven, you have to do
some crazy stuff on earth.
kazuph /
Created Jan 23, 2014
#!/usr/bin/env bash -eu
echo "${DIR}を圧縮します。"
cp -rp ${DIR} ${DIR}_org
convmv -f utf8 --nfd -t utf8 --nfc -r --notest ${DIR}/*
convmv -f utf8 -t cp932 -r --notest ${DIR}/*
zip -9 -r ${DIR}.zip ${DIR}
zipcloak ${DIR}
You can’t perform that action at this time.