Skip to content

Instantly share code, notes, and snippets.

udomsak / debug_aws_transfer_server.log
Created Sep 21, 2021
trace file from aws_transfer_server
View debug_aws_transfer_server.log
This file has been truncated, but you can view the full file.
2021-09-21T23:35:33.774+0700 [DEBUG] Adding temp file log sink: /tmp/terraform-log371252502
2021-09-21T23:35:33.774+0700 [INFO] Terraform version: 0.15.3
2021-09-21T23:35:33.774+0700 [INFO] Go runtime version: go1.16.2
2021-09-21T23:35:33.774+0700 [INFO] CLI args: []string{"/home/ubuntu/.tfenv/versions/0.15.3/terraform", "plan", "-out=tfplan"}
2021-09-21T23:35:33.774+0700 [TRACE] Stdout is a terminal of width 133
2021-09-21T23:35:33.774+0700 [TRACE] Stderr is a terminal of width 133
2021-09-21T23:35:33.774+0700 [TRACE] Stdin is a terminal
2021-09-21T23:35:33.774+0700 [DEBUG] Attempting to open CLI config file: /home/ubuntu/.terraformrc
2021-09-21T23:35:33.774+0700 [DEBUG] File doesn't exist, but doesn't need to. Ignoring.
udomsak / sftp_schema.json
Created Sep 9, 2021
aws transfer family session policy schema
View sftp_schema.json
"HomeDirectory": "string",
"HomeDirectoryMappings": [
"Entry": "string",
"Target": "string"
"HomeDirectoryType": "string",
"Policy": "string",
udomsak / loki.service
Created May 6, 2021
loki systemd unit file for ubuntu 18.04
View loki.service
Description=Loki service
ExecStart=/usr/local/bin/loki --config.file /etc/grafana/loki/loki-local-config.yaml
udomsak / cf-aws-ecr-with-iam-group-and-role.yaml
Created Nov 30, 2020
CloudFormation Amazon ECR with useraccount attach with IAM policy and group
View cf-aws-ecr-with-iam-group-and-role.yaml
# This Cloudformation will create User login only for AWS ECR with Push/Pull permission without console login permission.
# Output will produce AcessKey and SecretKey with Username.
# Group named 'GroupAccessECRImages'
AWSTemplateFormatVersion: 2010-09-09
Type: AWS::IAM::User
udomsak / terraform.debug.log
Created Sep 13, 2020
TF_VAR does not pass environment variable to terraform-digitalocean-provider
View terraform.debug.log
2020/09/13 14:24:05 [INFO] Terraform version: 0.13.2
2020/09/13 14:24:05 [INFO] Go runtime version: go1.14.7
2020/09/13 14:24:05 [INFO] CLI args: []string{"C:\\ProgramData\\chocolatey\\lib\\terraform\\tools\\terraform.exe", "apply", "-state=_test.state", "_test_"}
2020/09/13 14:24:05 [DEBUG] Attempting to open CLI config file: C:\Users\Admin\AppData\Roaming\terraform.rc
2020/09/13 14:24:05 [DEBUG] File doesn't exist, but doesn't need to. Ignoring.
2020/09/13 14:24:05 [DEBUG] ignoring non-existing provider search directory terraform.d/plugins
2020/09/13 14:24:05 [DEBUG] ignoring non-existing provider search directory C:\Users\Admin\AppData\Roaming\terraform.d\plugins
2020/09/13 14:24:05 [DEBUG] ignoring non-existing provider search directory C:\Users\Admin\AppData\Roaming\HashiCorp\Terraform\plugins
2020/09/13 14:24:05 [INFO] CLI command args: []string{"apply", "-state=_test.state", "_test_"}
2020/09/13 14:24:05 [TRACE] Meta.Backend: no config given or present on disk, so returning nil config
udomsak /
Created Aug 23, 2020
การเชื่อมต่อ กับ binance โดยใช้ WS ( WebSocket ) connect เพื่อการเชื่อมต่อแบบ Realtime
from binance.client import Client
from binance.websockets import BinanceSocketManager
เวลาทำงานกับ WSS ( Web Socket ให้ทำงานกับ API ตัวนี้ )
udomsak / python_thailand.ipynb
Last active Aug 2, 2020
community answer | Python Thailand
View python_thailand.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
udomsak /
Last active Apr 11, 2019
Bulk remove folks repositories
#!/usr/bin/env python
from github import Github
g = Github("4a3d3c5ba12e402015dcdcf55c312e0614xxxxx888s")
folks_repo = [ repo for repo in g.get_user().get_repos() if repo.fork == True]
for repo in folks_repo:
udomsak / runner.js
Created Dec 25, 2018
fastify-validation not work.
View runner.js
// Require the framework and instantiate it
const fastify = require('fastify')({
logger: true
const post_schema = {
method: 'GET',
schema: {
body: {
type: 'object',
udomsak /
Created Dec 24, 2018
Install postman on Fedora core 29 - Dec 2018
wget -O postman-linux-x64.tar.gz
sudo tar xvzf postman-linux-x64.tar.gz -C /opt
sudo ln -s /opt/Postman/Postman /usr/bin/postman
cat << EOF > ~/.local/share/applications/postman2.desktop
[Desktop Entry]
GenericName=API Client