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
Homebrew build logs for vim on Mac OS X 10.11.5 | |
Build date: 2016-06-24 12:34:14 |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<results> | |
<error>1</error> | |
<message>エラーです。エラーです。エラーです。エラーです。</message> | |
</results> |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<results> | |
<error>0</error> | |
<image_url>http://upload.wikimedia.org/wikipedia/commons/d/d3/Little_kitten.jpg</image_url> | |
<template_id>99</template_id> | |
</results> |
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/ruby | |
def getTotalCandy(candy) | |
bonus = candy / numForBonus | |
rest = candy % numForBonus | |
candy += bonus | |
nextExchangeableCandy = bonus + rest | |
until nextExchangeableCandy < numForBonus | |
bonus = nextExchangeableCandy / numForBonus | |
rest = nextExchangeableCandy % numForBonus | |
nextExchangeableCandy = bonus + rest |
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
■概要 | |
Simple Network Management Protocol(シンプル ネットワーク マネージメント プロトコル、SNMP)は、DARPAモデルに準じたIP ネットワーク上のネットワーク機器を監視(モニタリング)・制御するための情報の通信方法を定めるプロトコルである。 | |
※wikiより | |
http://ja.wikipedia.org/wiki/Simple_Network_Management_Protocol | |
■砕けて言うと | |
サーバのNFSマウント情報、負荷情報、ネットワーク情報などいろんな情報が | |
サーバに入らなくてもわかる。 |
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 [ $# -ne 2 ]; then | |
echo "you need 2 args, hostlist file and shell command string" 1>&2 | |
echo "ex) $0 hostlist.txt \"grep FATAL /usr/local/var/log/php/error.log\"" 1>&2 | |
exit 1 | |
fi | |
HOSTLIST=$1 | |
COMMAND=$2 | |
echo "TARGET HOSTS ARE" | |
cat ${HOSTLIST} |
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 | |
##BEFORE DOING THIS, YOU NEED TO CREATE SSH id_rsa.pub## | |
## | |
#ssh-keygen -t rsa | |
#ls -l ~/.ssh/id_rsa | |
#chmod 600 ~/.ssh/id_rsa | |
######################################################## | |
if [ $# -ne 1 ]; then | |
echo "you need a host list file." 1>&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/bash | |
if [ $# -ne 1 ]; then | |
echo "you need a search word to grep your known_hosts" 1>&2 | |
echo "ex) $0 shashinkan" 1>&2 | |
exit 1 | |
fi | |
SEARCH_WORD=$1 | |
echo "what server do you wanna ssh?" | |
select ANS in `cut -f1 -d, ~/.ssh/known_hosts | grep ${SEARCH_WORD}` |