- 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
$ 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
# 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
console.log('Loading function.'); | |
const https = require('https'); | |
const url = require('url'); | |
const slack_url = 'https://hooks.slack.com/services/XXXXX'; // slack url | |
const slack_req_opts = url.parse(slack_url); | |
slack_req_opts.method = 'POST'; | |
slack_req_opts.headers = {'Content-Type': 'application/json'}; | |
exports.handler = function(event, context) { |
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 | |
export LANG=ja_JP.utf8 | |
REPOS="$1" | |
REV="$2" | |
# コミットユーザ | |
COMMIT_AUTOER=`svnlook author -r ${REV} ${REPOS}` | |
# コミットログ |
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
Chef::Config[:cookbook_path].each{|elem| | |
if File.exists?(File.join(elem, "/nginx/templates/default/", node['nginx']['template_dir'])) | |
conf_dir = File.join(elem, "/nginx/templates/default/", node['nginx']['template_dir']) | |
Dir.chdir conf_dir | |
confs = Dir::glob("**/*") | |
confs.each do |t| | |
if File::ftype("#{conf_dir}/#{t}") == "file" | |
template "/etc/nginx/#{t}" do | |
owner "root" |
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 | |
#------------------------------------------------------------------------------------------------------------------------ | |
# cron setting: | |
# */3 * * * * /root/resource.bash > /dev/null 2>&1 | |
#------------------------------------------------------------------------------------------------------------------------ | |
#------------------------------------------------------------------------------------------------------------------------ | |
# ENVIRONMENT | |
#------------------------------------------------------------------------------------------------------------------------ | |
DIR_LOG="/tmp/`basename $0 .bash`" |
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 | |
MYSQL_DB="$1” | |
MYSQL_HOST=“${2:-localhost}” | |
MYSQL_PASS="${3:-password}" | |
mysql -u root -p${MYSQL_PASS} -h ${MYSQL_HOST} -s ${MYSQL_DB} -e "show tables;" | grep -v Tables_in_ | while read line; do | |
echo "== ${MYSQL_DB}.${line} =============================================================================" | |
mysql -u root -p${MYSQL_PASS} -h ${MYSQL_HOST} -s ${MYSQL_DB} -e "show create table ${MYSQL_DB}.${line};" | grep ENGINE | grep -v 'ENGINE=InnoDB' | |
done |
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 | |
FL_CHECK=".health_check.html.`hostname`" | |
MESSAGE="" | |
LIST_MOUNT[0]="/var/www/html/contents" | |
ret=0 | |
flg_err=0 | |
for i in ${LIST_MOUNT[@]}; do | |
rm -f "${i}/${FL_CHECK}" |
NewerOlder