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
kazuph / chrome_love.md
Last active Oct 3, 2019
僕の愛したChromeExtensions
@kazuph
kazuph / Dockerfile
Last active Apr 8, 2019
centosのimageからsshを使えるようにするだけのDockerfile。
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
kazuph / esa2esa.rb
Last active Mar 23, 2017
esaを一度解約したが、再度使い始めたときに使うスクリプト(ExportデータをそのままImport)
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
kazuph / .bash_profile
Last active Feb 2, 2017
cronからbundle exec...はsu - <USER> -lc ...が一番便利 ref: http://qiita.com/kazuph/items/c530359eada5b2639e68
View .bash_profile
export PATH="$HOME/.rbenv/bin:$PATH"
eval "$(rbenv init -)"
View puma
#!/bin/sh
#
# 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/puma.pid
@kazuph
kazuph / file0.txt
Last active Dec 19, 2016
iPhoneアプリに必要なアイコンを全サイズ生成するシェルスクリプト ref: http://qiita.com/kazuph/items/0f68301257d085f8e589
View file0.txt
$ brew install ImageMagick
View .vimrc
"dein Scripts-----------------------------
if &compatible
set nocompatible " Be iMproved
endif
" Required:
set runtimepath^=/home/pi/.dein/repos/github.com/Shougo/dein.vim
" Required:
call dein#begin(expand('/home/pi/.dein'))
@kazuph
kazuph / api.rb
Created Jan 28, 2014
grape-swaggerでgrapeでつくったAPIのドキュメントを自動生成する ref: http://qiita.com/kazuph/items/7a63d1cf22f2c6ab509d
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
kazuph / winzip.sh
Created Jan 23, 2014
macでwindows用に文字コードを変換したパスワード付きのzipを生成する(かも
View winzip.sh
#!/usr/bin/env bash -eu
DIR=$1
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}
@kazuph
kazuph / config
Last active Jan 4, 2016
Vagrantでvagrantのデフォの秘密鍵じゃなくて自分のいつもの秘密鍵を使えるようにするシェルスクリプト ref: http://qiita.com/kazuph/items/0d9d723b36720b9bd6ed
View config
Host vagrant
HostName 127.0.0.1
User vagrant
Port 2222 # ← これは変わる可能性がある
You can’t perform that action at this time.