Skip to content

Instantly share code, notes, and snippets.

View officel's full-sized avatar
:octocat:
work work work

NISHIMURA Yoshitaka officel

:octocat:
work work work
View GitHub Profile
@officel
officel / gist:c077f27852a01822b82e72e724b01327
Last active November 17, 2022 03:02
[terraform] map の list の中から特定の要素を抽出するやつ
$ cat test.tf
variable "employee" {
type = "list"
default = [
{
no = 1
name = "田中"
},

Keybase proof

I hereby claim:

  • I am officel on github.
  • I am raki (https://keybase.io/raki) on keybase.
  • I have a public key ASD6mjBzvnQ6uvU2CmjCQnKhSFJHMnk4yEJFBtsWH_J-7go

To claim this, I am signing this object:

@officel
officel / README.md
Created June 4, 2019 15:32
CloudAMQP PHP exsample on docker
@officel
officel / init.lua
Created June 20, 2019 04:16
Hammerspoon で iTerm2 に入った時、自動で英数モードにする
local function keyCode(key, modifiers)
modifiers = modifiers or {}
return function()
hs.eventtap.event.newKeyEvent(modifiers, string.lower(key), true):post()
hs.timer.usleep(1000)
hs.eventtap.event.newKeyEvent(modifiers, string.lower(key), false):post()
end
end
local function remapKey(modifiers, key, keyCode)
@officel
officel / main.tf
Created August 9, 2019 08:38
terraform v0.12.6 , provider.aws v2.23.0 , ec2_instance credit_specification CRASH
data "aws_vpc" "default" {
default = true
}
data "aws_subnet_ids" "default" {
vpc_id = data.aws_vpc.default.id
}
data "aws_security_group" "default" {
@officel
officel / aws_iam.tf
Created April 24, 2020 04:17
terraform で AWS IAM Group & User で PATH がセットされているとユーザ自身でパスワード変更できないのか
resource "aws_iam_group" "test" {
name = "test_path"
path = "/test/"
}
resource "aws_iam_group_policy_attachment" "test" {
group = aws_iam_group.test.name
policy_arn = "arn:aws:iam::aws:policy/AmazonS3ReadOnlyAccess"
}
@officel
officel / multi_topic_branch.sh
Created June 17, 2020 03:58
Pro Git のブランチ機能 - ブランチでの作業の流れのFigure 28,29
#!/bin/bash
# see https://git-scm.com/book/en/v2/Git-Branching-Branching-Workflows
repo="test"
name="your_name"
mail="your@example.com"
# clean
rm -fr ${repo} ${repo}.git
@officel
officel / test.yml
Last active January 13, 2021 12:44
[Q] [ansible] [how to set default value in list of dict] [GOAL]
---
- name: test
hosts: localhost
become: no
gather_facts: no
vars:
list1_default_dict:
name: "unknown"
k1: "x"