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
for i=1, 100 do | |
if i%3 == 0 and i%5 == 0 then | |
print(fizzbuzz') | |
elseif %3 == 0 then | |
print('fizz') | |
elseif i%5 == 0 then | |
print('buzz') | |
else | |
print(i) | |
end |
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
| static/ | |
| | | css/ | |
| | | fonts/ | |
| | | images/ | |
| | | js/ | |
| | | movies/ | |
| browser_scripts/ # js | |
| data/ | |
| scripts/ # wsgi | |
| submodule/ |
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
# coding: utf-8 | |
""" | |
ハンバーガーショップの合計金額計算 | |
""" | |
import sys | |
from collections import defaultdict | |
######## | |
# マスターデータ定義クラス群 |
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
def trim_duplicate_by_objects_list(objects_list, obj_attr_name): | |
trimd = {} | |
for o in objects_list: | |
key = getattr(o, obj_attr_name) | |
if not key: | |
continue | |
trimd[key] = o | |
return trimd.values() |
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) |
NewerOlder