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
SS=$1 | |
# get json | |
curl -s "https://api.rss2json.com/v1/api.json?rss_url=https%3A%2F%2Fstatus.cybozu.com%2Frss%2Fmonitor-${SS}?tz=540" > /tmp/${SS}.json | |
# output template | |
cat << EOS | |
以下の時間帯、サービスにアクセスし辛くなっていました。 | |
現在は解消しています。 | |
EOS |
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
# forest/etc/ansible/canary/java-lives/canary_groups.json | |
{ | |
"all" : { | |
"children" : { | |
"live-fronts" : "", | |
"live-backs" : "" | |
}, | |
"vars" : { | |
"jdk_package" : "cybozu-oracle-jdk-8", | |
"jdk_version" : "1.8.0.162-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/sh | |
# This command is make sure current version and target version are equal. | |
PACKAGE_NAME=$1 | |
PREF_FILE="/etc/apt/preferences.d/${PACKAGE_NAME}.pref" | |
if [ ! -e "${PREF_FILE}" ]; then | |
echo "${PACKAGE_NAME}.pref is not found. Before using, please deploy config file of 'apt pinning'." | |
exit 1 | |
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
import sys | |
import json | |
from ansible.parsing.dataloader import DataLoader | |
try: | |
from ansible.inventory.manager import InventoryManager | |
A24 = True | |
except ImportError: | |
from ansible.vars import VariableManager |
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
(lambda arg: subprocess.check_call( | |
' '.join([ | |
#"ssh foo.jp", # TODO:delete | |
"hdfs dfs -test -e /path/to/dir/{0}" | |
]).format(arg), | |
shell=True | |
))(foo) |
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
vim $(find . -iname $1) | |
echo $(find . -iname $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 | |
*.swp | |
*.bak | |
*.old | |
*.egg | |
*.egg-info | |
*.crt | |
*.key | |
*.pem | |
*.pub |
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 python | |
# -*- coding: utf-8 -*- | |
import json | |
import sys | |
import shlex | |
from ansible.module_utils.basic import * | |
DOCUMENTATION = ''' | |
--- |
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/python | |
# | |
# Get uuid by blkid output. | |
# :param blkid: str | |
# :param target: str | |
# :rtype :str | |
# | |
import json | |
import sys | |
import shlex |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<script src="http://www.google.com/jsapi"></script> | |
<script>google.load('jquery', 1);</script> | |
<script src="http://twitter.github.com/hogan.js/builds/2.0.0/hogan-2.0.0.js"></script> | |
<script> | |
$(function() { | |
function callAPI (method, url, async){ |
NewerOlder