Skip to content

Instantly share code, notes, and snippets.

@mollifier
mollifier / .zshrc
Last active August 16, 2020 09:51
シンプルな zshrc
# シンプルな zshrc
# License : MIT
# http://mollifier.mit-license.org/
# 環境変数
export LANG=ja_JP.UTF-8
# 補完機能を有効にする
autoload -Uz compinit
compinit
@mollifier
mollifier / try_zsh.md
Last active January 10, 2019 18:07
zsh を使おう

zsh を使おう

これは2013/02/16に開催された 俺聞け4 の発表資料です。

自己紹介

名前
三宅
@mollifier
mollifier / zshrc_useful.sh
Last active April 9, 2024 06:29
少し凝った zshrc
# 少し凝った zshrc
# License : MIT
# http://mollifier.mit-license.org/
########################################
# 環境変数
export LANG=ja_JP.UTF-8
# 色を使用出来るようにする
@mollifier
mollifier / _jq
Created July 13, 2013 20:39
Completion script for jq. jq is a lightweight and flexible command-line JSON processor. http://stedolan.github.io/jq/
#compdef jq
# ------------------------------------------------------------------------------
# Copyright (c) 2011 Github zsh-users - http://github.com/zsh-users
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright
@mollifier
mollifier / body.sh
Created September 5, 2013 15:14
開始行と終了行を指定して、ファイルのその範囲内だけを出力するシェルの関数
# 開始行と終了行を指定して、ファイルのその範囲内だけを出力するシェルの関数です。
# bash, zsh で動作します。
# 使い方の例
# body 10,20 file1.txt
function body() {
if [[ $# -eq 0 || "$1" == "-h" || "$1" == "--help" ]] ; then
cat << EOF
usage: $0 [START],[END] [FILE]
Output FILE from START to END line.
@mollifier
mollifier / double_space_keybind.zsh
Created November 25, 2013 03:27
zsh で連続したスペースにキーバインドを割り当てる ref: http://qiita.com/mollifier/items/2ba8ebddc222f9d21b6d
function _double_space_to_git() {
if [[ "${BUFFER}" == " " ]]; then
LBUFFER="git "
else
zle self-insert
fi
}
zle -N _double_space_to_git
bindkey ' ' _double_space_to_git
@mollifier
mollifier / wip-pr
Last active August 29, 2015 14:00 — forked from bouzuya/wip-pr
#!/bin/bash
# Description:
# Backlog + git-flow + WIP PR script
# Usage:
# wip-pr pj-123
#
# Requirement:
# use Mac OS X
@mollifier
mollifier / .zshrc_word-chars
Last active September 11, 2021 05:13
zsh で / や . も単語の区切り文字とみなす設定
# .zshrcに書く
# word-chars で指定した文字が単語の区切りとみなされる。
# M-f, M-b, ^w などの動作に影響する
autoload -Uz select-word-style
select-word-style default
zstyle ':zle:*' word-chars ' /=;@:{}[]()<>,|.'
zstyle ':zle:*' word-style unspecified
@mollifier
mollifier / autols.zsh
Created October 6, 2014 12:46
zshで存在しないコマンドを実行しようとしたときはlsを行うようにする
# これを.zshrcに書く
function command_not_found_handler() {
shift
ls "$@"
}
FROM node:0.10.36
MAINTAINER "Hideaki Miyake" <mollifier@gmail.com>
RUN mkdir -p /usr/local/app
WORKDIR /usr/local/app
RUN git clone https://github.com/emanon001/drinking-water-watcher.git
RUN cd drinking-water-watcher && npm install
ENTRYPOINT cd /usr/local/app/drinking-water-watcher && npm start