Skip to content

Instantly share code, notes, and snippets.

@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 / 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
if which peco &> /dev/null; then
function peco_select_history() {
BUFFER=$(fc -l -n -r 1 | \
peco --layout=bottom-up --query "$LBUFFER")
CURSOR=$#BUFFER # move cursor
zle -R -c # refresh
}
zle -N peco_select_history
bindkey '^R' peco_select_history
// Jetpack Feature : disable-hatena-keyword.js
// はてなダイアリー (http://d.hatena.ne.jp/) の
// キーワードを無効化する
jetpack.tabs.onReady(function(targetDocument) {
if (targetDocument.defaultView.frameElement) {
return;
}
if (targetDocument.location.href.search(/^http:\/\/d.hatena.ne.jp\//) !== -1) {
// Jetpack feature : log-url.js
// ページを開いたらそのページの URL をログ表示する
jetpack.tabs.onReady(function(targetDocument) {
// frame, ifreme の場合は何もしない
if (targetDocument.defaultView.frameElement) {
return;
}
console.log(targetDocument.location.href);
// Jetpack feature : disable-hatena-keyword-pageMods.js
// はてなダイアリー (http://d.hatena.ne.jp/) のキーワードを無効化する
// pageMods を使用するバージョン
jetpack.future.import("pageMods");
var callback = function(targetDocument) {
$(targetDocument).find("a.keyword").each(function() {
$(this).replaceWith($(this).html());
});
};
// jetpack feature : info.js
// info ボタンを押すと選択部分を Google で検索し、
// 検索件数を alert する
jetpack.statusBar.append({
html: "<button>info</button>",
width: 60,
onReady: function(widget) {
$(widget).click(function() {
var word = jetpack.tabs.focused.contentWindow.getSelection();
// Jetpack Feature : hello-jetpack.js
// ページを開いたら通知する
jetpack.tabs.onReady(function() {
jetpack.notifications.show("Hello Jetpack!");
});
// Jetpack Feature : hello-statusbar.js
// ステータスバーのラベルをクリックすると通知する
jetpack.statusBar.append({
html: "Hello",
width: 45,
onReady: function(widget){
$(widget).click(function() {
jetpack.notifications.show("Hello Jetpack!");
});