- POSTのbodyの中にuser_idというパラメータが含まれており、そのuser_idが特定の値(この例だと1000,2000,5000)の場合のみリクエストを許可
- それ以外はメンテナンスを返す
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 | |
SH_KNIFE="/usr/local/chef/chef-repo/knife_parallel.bash" | |
LOG_FILE="/usr/local/chef/chef-repo/knife_base.log" | |
func_usage() { | |
echo "Usage: `basename $0` {bootstrap|prepare|cook}" | |
return 0 | |
} |
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
# encoding=utf-8 | |
import argparse | |
import boto3 | |
import os | |
import sys | |
import json | |
from datetime import datetime | |
import re | |
import uuid |
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 | |
# | |
# unicorn | |
# | |
# chkconfig: - 80 20 | |
# description: unicorn | |
# processname: unicorn | |
# config: /usr/local/redmine/config/unicorn.rb | |
# pidfile: /usr/local/redmine/tmp/pids/.pid |
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 | |
LOG_FILE="access_log-20130310" | |
for i in `seq 4 1 23`; do | |
hour=`printf "%02d" ${i}` | |
# sourceIp | |
grep "09/Mar/2013:${hour}" ${LOG_FILE} | awk '{print $1}' | sort | uniq -c | sort -r > ip-${hour}.log | |
# url | |
grep "09/Mar/2013:${hour}" ${LOG_FILE} | awk '{print $7}' | sort | uniq -c | sort -r > url-${hour}.log |
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
# 'host-notify-by-jabber' command | |
define command{ | |
command_name host-notify-by-jabber | |
command_line /usr/bin/perl $USER1$/notify_via_jabber.pl $CONTACTPAGER$ "`/usr/bin/printf \"***** Nagios *****\nHost '$HOSTALIAS$' is $HOSTSTATE$ - Info: $HOSTOUTPUT$\"`" | |
} | |
# 'host-notify-by-jabber' command to groupchat | |
define command{ | |
command_name host-notify-by-jabber-groupchat | |
command_line /usr/bin/perl $USER1$/notify_via_jabber.pl $CONTACTPAGER$ "`/usr/bin/printf \"***** Nagios *****\nHost '$HOSTALIAS$' is $HOSTSTATE$ - Info: $HOSTOUTPUT$\"`" groupchat |
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
$ diff ~/.config/fisherman/bobthefish/fish_prompt.fish ~/.config/fisherman/bobthefish/fish_prompt.fish.org Fri Jan 4 21:11:16 2019 | |
509,516c509 | |
< # Customize: START | |
< set -l ctx (string trim -c '"\' ' -- $val) | |
< set -l ns (kubectl config view -o "jsonpath={.contexts[?(@.name==\"$ctx\")].context.namespace}") | |
< [ -z $ns ]; and set -l ns 'default' | |
< set -l context "$ctx/$ns" | |
< # Customize: END | |
< | |
< #set -l context (string trim -c '"\' ' -- $val) |
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
/* | |
* Copyright 2010-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"). | |
* You may not use this file except in compliance with the License. | |
* A copy of the License is located at | |
* | |
* http://aws.amazon.com/apache2.0 | |
* | |
* or in the "license" file accompanying this file. This file is distributed |
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
[user1@canal-mac01 19:58:46 log][315][20]$ brew install nagios | |
Warning: Your Xcode (4.6.3) is outdated | |
Please update to Xcode 5.0.1. | |
Xcode can be updated from the App Store. | |
==> Installing dependencies for nagios: libpng, jpeg, gd, nagios-plugins | |
==> Installing nagios dependency: libpng | |
==> Downloading https://downloads.sf.net/project/machomebrew/Bottles/libpng-1.5.14.mountain_lion.bottle.tar.gz | |
######################################################################## 100.0% | |
==> Pouring libpng-1.5.14.mountain_lion.bottle.tar.gz | |
🍺 /usr/local/Cellar/libpng/1.5.14: 15 files, 1.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
#!/bin/bash | |
func_usage() { | |
echo "Usage: `basename $0` {role} {command}" | |
return 0 | |
} | |
if [ $# -lt 2 ]; then | |
func_usage | |
exit 1 |
NewerOlder