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
<?php | |
/** | |
* kintone API Shortcode example | |
* | |
* License: GNU General Public License v2 or later | |
**/ | |
add_shortcode ( 'building-list' , 'kintone_building_list'); | |
function kintone_building_list( $atts ) { | |
$atts = shortcode_atts( | |
array( |
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 boto3 | |
cognito = boto3.client('cognito-idp') | |
UserPoolId='YOUR_USERPOOL_ID' | |
def getUsers(): | |
response = cognito.list_users( | |
UserPoolId=UserPoolId, | |
Filter="cognito:user_status='CONFIRMED'" | |
) | |
return response |
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
{ | |
"AWSTemplateFormatVersion": "2010-09-09", | |
"Description": "This AWS CloudFormation template helps you provision the AWS WAF reputation list blocking Lambda function. It creates a WebACL, two Rules and two IPSets. If you wish, you can define more WAF Rules and IPSets and add the Rule IDs to the Input defined for the Lambda function. The Lambda function is executed using Amazon CloudWatch Events on a schedule to automate the update of the IPSets. You will be billed for the AWS resources used if you create a stack from this template. **NOTICE** Copyright 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 on an AS IS BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific la |
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 | |
APIKEY=${1} | |
if [ "${APIKEY}" = "" ]; then | |
echo "Please set recruit api key" | |
exit 1 | |
fi | |
AREA=${2} | |
if [ "${AREA}" = "" ]; then | |
echo "Please set search keyword" | |
exit 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/bash | |
APIKEY=${1} | |
if [ "${APIKEY}" = "" ]; then | |
echo "Please set recruit api key" | |
exit 1 | |
fi | |
AREA=${2} | |
if [ "${AREA}" = "" ]; then | |
echo "Please set search keyword" | |
exit 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/bash -ex | |
tmp_json=`mktemp` | |
amimoto_json='/opt/local/amimoto-managed.json' | |
json='{"wordpress":{"jinkei_cf":"true"}}' | |
[ ! -e /opt/local ] && /bin/mkdir -p /opt/local | |
if [ -f $amimoto_json ]; then | |
hash jq || /usr/bin/yum install -y jq | |
/usr/bin/jq -s '.[0] * .[1]' $amimoto_json <(echo $json) > $tmp_json |
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
provider "aws" { | |
region = "us-west-2" | |
profile = "YOUR_AWS_CLI_PROFILE" | |
} | |
resource "aws_cloudformation_stack" "network" { | |
name = "STACK_NAME" | |
parameters { | |
KeyName = "${aws_key_pair.deployer.id}", | |
SSHLocation = "0.0.0.0/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
function buildSource(message, extractedFields) { | |
if (extractedFields) { | |
var source = {}; | |
for (var key in extractedFields) { | |
if (extractedFields.hasOwnProperty(key) && extractedFields[key]) { | |
var value = extractedFields[key]; | |
if (isNumeric(value)) { | |
source[key] = 1 * value; |
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
// v1.1.2 | |
var https = require('https'); | |
var zlib = require('zlib'); | |
var crypto = require('crypto'); | |
var endpoint = 'YOUR_AMAZON_ELASTICSEARCH_SEARVICE_ENDPOINT.us-east-1.es.amazonaws.com'; | |
exports.handler = function(input, context) { | |
// decode input from base64 | |
var zippedInput = new Buffer(input.awslogs.data, 'base64'); |
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
var AWS = require('aws-sdk'); | |
var conf = require('./config.js'); | |
var cloudfront = new AWS.CloudFront({ | |
apiVersion: '2016-09-07', | |
accessKeyId: AWS_ACCESS_KEY, | |
secretAccessKey: AWS_SECRET_KEY, | |
}); | |
function updateCloudFrontDistribution( distribution ) { |