- my.cnf か SHOW VARIABLES の結果を入力にとる
- 入力を解析し、必要なパラメータ値を取得する
- 計算
- 結果を標準出力に出力する
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Copyright (c), Naruse Motoki ([email protected]) | |
# Licensed under The MIT License | |
dryrun=`git push -n 2>&1` | |
echo "$dryrun" | |
fromto=`echo $dryrun | sed -e "s/.* \([0-9a-z]\+\.\.[0-9a-z]\+\) .*/\1/g"` | |
if expr "$fromto" : "^[0-9a-z]\+\.\.[0-9a-z]\+$" >/dev/null; then | |
echo "`git log --date=short --pretty=format:"%h %ad %an %s" $fromto`" | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!zsh | |
# __git_branch_switches | |
# _git-submodule | |
# _git-filter-branch | |
(( $+functions[_git-now] )) || | |
_git-now () { | |
local curcontext=$curcontext state line | |
declare -A opt_args |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;; pit.el --- Manipulate pit data. | |
;; Copyright (C) 2008 Takeru Naito | |
;; Author: Takeru Naito <[email protected]> | |
;; Original: cho45 http://lowreal.rubyforge.org/pit/ | |
;; This file is free software; you can redistribute it and/or modify | |
;; it under the terms of the GNU General Public License as published | |
;; by the Free Software Foundation; either version 2, or (at your | |
;; option) any later version. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
# -*- coding: utf-8-unix; -*- | |
use strict; | |
use warnings; | |
use Config::Pit; | |
use Net::Growl; | |
use WWW::Mechanize; |