- 出力結果をパイプに渡して加工するので、
apt
ではなくapt-get
を利用する。
This file contains hidden or 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/bash | |
######################################## | |
# functions | |
## function: add strings into file unress 'any-words' | |
addstr_unless () { | |
_subject="${1}" | |
_add_string="${2}" | |
_target_file="${3}" | |
test "${#}" -ne 3 && return 1 |
tfschema最新版リリースバイナリを ${HOME}
のbinにダウンロードして配置するワンライナー。
- ただし、アーキテクチャは自前指定。
curl -kLRs `curl -kLRs https://api.github.com/repos/minamijoyo/tfschema/releases/latest | grep browser_download_url | grep linux | grep amd64 | awk '{print($NF);}' | tr -d '"'` | tar -C ~/bin -zxf - tfschema
- anyenvだと
${ANYENV_DEFINITION_ROOT}/tfenv
でinstall_plugin
指定すれば良いのだろうか…?
This file contains hidden or 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 | |
#set -v # Output in Verbose: Print Command. | |
#set -x # Output in Verbose: Expand Variable. | |
#set -e # Fail on Error. | |
#set -u # Fail on Undefined variable. | |
readlink=`which greadlink 2> /dev/null || true` | |
test -z "${readlink}" && readlink=`which readlink 2> /dev/null || true` | |
if [ -n "${readlink}" ]; then | |
real_path=`${readlink} -fn "$0"` |
This file contains hidden or 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/perl | |
use strict; | |
use warnings; | |
# sets mtime and atime of files to the latest commit time in git | |
# | |
# This is useful for serving static content (managed by git) | |
# from a cluster of identically configured HTTP servers. HTTP | |
# clients and content delivery networks can get consistent | |
# Last-Modified headers no matter which HTTP server in the |
This file contains hidden or 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 | |
base_dir=`dirname $0` | |
patch_list="${base_dir}/patch_list.txt" | |
cd ${base_dir} | |
cat ${patch_list} | while read name url time uuid; do | |
# Save some typing | |
export short_url=`basename ${url}` |
This file contains hidden or 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
"repositories":[ | |
{ | |
"type":"vcs", | |
"url":"https://github.com/mAster-rAdio/composer-yaml" | |
} | |
], | |
"require":{ | |
..., | |
"igorw/composer-yaml":"*@dev" | |
} |
This file contains hidden or 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
use strict; | |
use warnings; | |
use Plack::Builder; | |
use Plack::App::Directory; | |
use Munin::Master::Utils; | |
use Date::Manip; | |
use POSIX qw(strftime); | |
use File::Slurp; | |
my $GRAPHER = "/usr/share/munin/munin-graph"; |
This file contains hidden or 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
--- innobackupex.orig 2013-05-23 03:50:09.000000000 +0900 | |
+++ innobackupex 2013-06-19 19:15:00.000000000 +0900 | |
@@ -1593,10 +1593,19 @@ | |
print FILE "CHANGE MASTER TO MASTER_LOG_FILE='$filename', MASTER_LOG_POS=$position\n"; | |
close(FILE); | |
+ my $orig_datadir = get_option(\%config, 'mysqld', 'datadir'); | |
+ | |
if ($option_stream) { | |
+ system("cd $orig_datadir; $stream_cmd master.info") |
NewerOlder