Skip to content

Instantly share code, notes, and snippets.

View sogaoh's full-sized avatar

Hisashi SOGA sogaoh

View GitHub Profile
@sogaoh
sogaoh / validateRequestCompliantForOpenApiSpec_example.php
Created August 3, 2020 04:23
validateRequestCompliantForOpenApiSpec 実装例
/**
* @param array $requestBody
* @param string $uri
* @param string $method
* @return JsonResponse|null
*/
public function validateRequestCompliantForOpenApiSpec(
array $requestBody,
string $uri,
string $method
@sogaoh
sogaoh / azurerm_subnet_example.tf
Created May 4, 2020 07:15
[incorrect warning] to azurerm_subnet . address_prefixes
resource "azurerm_subnet" "example-subnet" {
name = "example-subnet"
virtual_network_name = azurerm_virtual_network.example_vnet.name
resource_group_name = azurerm_resource_group.example_rg.name
address_prefixes = ["172.31.20.0/24"]
#address_prefix = "172.31.20.0/24"
}
@sogaoh
sogaoh / file0.txt
Created November 21, 2016 15:57
[Selenium]スクリーンショット画像取得方法一例 ref: http://qiita.com/sogaoh/items/c5005f7c93a9d4b8e8c4
$ vagrant box add {title} {url}
$ vagrant init {title}
@sogaoh
sogaoh / config
Last active March 4, 2016 11:57
ssh_config_sample
IdentityFile ~/.ssh/id_rsa
IdentityFile ~/.ssh/id_rsa_screenshot
Host github.com
Compression yes
IdentityFile ~/.ssh/id_rsa_sogaoh
#!/bin/sh
while read LINE ;do
i=0
for inline in $LINE ;do
case $inline in
*'@'*) echo $inline \
| gawk '{a=substr($0,1,match($0,"@")-1);\
c=gensub(/[a-z]|[0-9]|[A-Z]/,"*","g",a);\
b=substr($0,match($0,"@"));printf"%s%s",c,b}' ;;
*) echo -n "$inline ";;
@sogaoh
sogaoh / dummy_smtp.md
Created November 13, 2015 06:28
dummy_smtp
  • バックグラウンドでダミーSMTPサーバー起動

    • nohup python -m smtpd -n -c DebuggingServer localhost:1025 > /var/log/DebuggingServer &
  • DebuggingServer に出しているメール内容を文字化けなしで見る

  • tailf DebuggingServer | nkf -u -w