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 | |
# Git pre-commit hook script to verify file encodings. | |
# Works with Perl 5.8. The bundled perl in msysgit is also supported. | |
# Copyright (C) 2012 Takeshi Yaegashi | |
# Encodings allowed to be committed. | |
my @allowed = qw/ascii utf8/; | |
# Encodings possible to be seen - optional. |
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
# /etc/monit/monitrc | |
set daemon 60 | |
set logfile /var/log/monit.log | |
set idfile /var/lib/monit/id | |
set statefile /var/lib/monit/state | |
set eventqueue basedir /var/lib/monit/events slots 100 | |
set mailserver mail.example.com | |
set alert [email protected] | |
set httpd port 2812 and use address localhost allow localhost | |
include /etc/monit/conf.d/* |
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 -x | |
export RAILS_ENV=production | |
export REDMINE_LANG=ja | |
git clone https://github.com/redmine/redmine | |
cd redmine | |
rm config.ru | |
echo 'gem "unicorn"' >Gemfile.local | |
cat <<EOF >config/database.yml | |
$RAILS_ENV: | |
adapter: sqlite3 |
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 | |
# Start ssh-agent and register environment variables permanently in HKCU. | |
# Copyright (C) 2013 YAEGASHI Takeshi <[email protected]> | |
# Use a fixed path for the ssh-agent socket endpoint. | |
# SSH_FIXED_SOCK="/tmp/ssh-agent-$(id -u).sock" | |
eval $(ssh-agent -k) |
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
# /hosts | |
localhost ansible_connection=local |
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 | |
if test $# -lt 2; then | |
echo "Usage: $0 <common name> <output> [ca options ...]" >&2 | |
exit 1 | |
fi | |
cn=$1 | |
out=$2 | |
shift 2 |
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 | |
set -e | |
if test $# -lt 2; then | |
echo "Usage: $0 <common name> <output> [<start> <end>]" >&2 | |
exit 1 | |
fi | |
cn=$1 |
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/bash | |
# This version conforms to Bash 3.2.53 on OS X. | |
stab=('\e[0;31;47m ♦' '\e[0;31;47m ♥' '\e[0;30;47m ♠' '\e[0;30;47m ♣') | |
ntab=(2 3 4 5 6 7 8 9 10 J Q K A) | |
match() { | |
for i; do | |
printf " ${stab[$((i/13))]}${ntab[$((i%13))]}\e[0m" |
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
--- | |
- hosts: all | |
connection: paramiko | |
vars: | |
ansible_ssh_private_key_file: /path/to/private_key | |
ansible_ssh_pass: passphrase_for_private_key | |
tasks: | |
- debug: | |
msg: hello |
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
$ ansible-playbook -i localhost, basicexp-playbook.yml | |
PLAY [localhost] ************************************************************** | |
TASK: [OK: ['a', 'b', 'c']] *************************************************** | |
ok: [localhost] => { | |
"msg": [ | |
"a", | |
"b", | |
"c" |
OlderNewer