Skip to content

Instantly share code, notes, and snippets.

View Kudankita's full-sized avatar

Hamamura Kudankita

View GitHub Profile
@Grab('org.codehaus.groovy.modules.http-builder:http-builder:0.7')
@Grab('oauth.signpost:signpost-core:1.2.1.2')
@Grab('oauth.signpost:signpost-commonshttp4:1.2.1.2')
import groovyx.net.http.RESTClient
println "hello"
def restClient = new RESTClient( 'http://dummy.restapiexample.com/' )
def res = restClient.get(path: "api/v1/employees")
print res.data
import boto3
import os
def lambda_handler(event, context):
client = boto3.client('rds')
db_name = os.environ['db_name']
print(db_name)
@Kudankita
Kudankita / sample-fargate-schedle.yaml
Last active August 9, 2020 06:33
CloudFormationでFargateのタスクのスケジューリングを構築する #Fargate https://dev.classmethod.jp/articles/cloudformation-fargate-scheduled-tasks/
AWSTemplateFormatVersion: "2010-09-09"
Description: Fargate and ALB Create
Metadata:
"AWS::CloudFormation::Interface":
ParameterGroups:
-
Label:
default: "Project Name Prefix"
Parameters:
@Kudankita
Kudankita / slack_report.py
Created March 31, 2020 14:12
コマンドライン引数をWEBHHOOK_URLへPOSTする。
import urllib.request
import json
import sys
import os
data = {"text": sys.argv[1]}
header = {"Content-type": "application/json"}
req = urllib.request.Request(
os.environ["WEBHOOK_URL"], json.dumps(data).encode(), header
)
@Kudankita
Kudankita / main.yml
Created March 21, 2020 11:17
ansible hands on 最終形
- name: Ansible sample 1
hosts: localhost
connection: local
handlers:
- name: handler sample
command: touch handler.log
tasks:
- name: install nkf
yum: name=nkf
- name: directory creation sample
<style>
#container {
display: grid;
grid-template-rows: 1fr 1fr;
grid-template-columns: 1fr 1fr 1fr;
}
@media (max-width:980px) {
#container {
display: grid;