Skip to content

Instantly share code, notes, and snippets.

View hassaku63's full-sized avatar

Takuya Hashimoto hassaku63

View GitHub Profile
import boto3
autoscaling = boto3.client("autoscaling")
#org_param = dict(MinSize=2, DesiredCapacity=2) # 復元先のパラメータ
stop_param = dict(MinSize=0, DesiredCapacity=0) # 擬似Stopする時のパラメータ
def lambda_handler(event, context):
"""
cron triggered function
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "Stmt1444892806511",
"Action": [
"autoscaling:UpdateAutoScalingGroup"
],
"Effect": "Allow",
"Resource": "*"
{
"Version": "2012-10-17",
"Id": "Policy1234567890123",
"Statement": [
{
"Effect": "Allow",
"Principal": "*",
"Action": [
"s3:GetObject"
],
rforcecom.getObjectDescription(sf, 'Report')$name
# 特定の名前を持つオブジェクトの情報を抽出する。この場合は「商談」と「商品」
# objlist ... rforcecom.getObjectList() の返り値
objlist[mapply(function(elm){ is.element(elm, c("商談", "商品")) }, objlist$label),]
@hassaku63
hassaku63 / start_first_vuetify_project.sh
Created October 20, 2018 15:52
start vuetify project
#
# Date: 2018/10/20
# Author: @hassaku_63
#
#
# Install Vue CLI 3
#
npm install -g @vue/cli
# or yarn global add @vue/cli
#
# Date: 2018-12-08
# Author: hassaku63
#
# These codes are licensed under CC0.
# http://creativecommons.org/publicdomain/zero/1.0/deed.ja
#
# Prerequisite:
# - Selenium webdriver
#
@hassaku63
hassaku63 / cognito-authorizer-example.yaml
Created December 13, 2018 03:22
Example: API Gateway with Cognito Authorizer
AWSTemplateFormatVersion: '2010-09-09'
Transform: AWS::Serverless-2016-10-31
Description: >
AWS Serverless Application
Sample SAM Template for AWS Serverless Application
# More info about Globals: https://github.com/awslabs/serverless-application-model/blob/master/docs/globals.rst
Globals:
@hassaku63
hassaku63 / login.vue
Created April 2, 2019 00:27
vuetify-snippet-login-card.vue
<v-container fuild fill-height>
<v-layout justify-center>
<v-flex xs12 sm8 md4>
<!-- login view -->
<v-card>
<v-toolbar dark flat>
<v-toolbar-title>Login Form</v-toolbar-title>
</v-toolbar>
<v-card-text>
<!-- login form -->
@hassaku63
hassaku63 / keybindings.json
Created July 19, 2019 17:17
VSCode_move_focus_between_editor_and_terminal.json
// VSCodeで、エディタとターミナルを往復できるショートカットの定義
// Place your key bindings in this file to override the defaultsauto[]
[
{
"key": "ctrl+`",
"command": "workbench.action.focusActiveEditorGroup",
"when": "terminalFocus"
},
{
"key": "ctrl+`",