This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MIT License | |
Copyright (c) 2024 kurochan | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is | |
furnished to do so, subject to the following conditions: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package datadog | |
import ( | |
"bytes" | |
"encoding/base64" | |
"encoding/binary" | |
"fmt" | |
"strings" | |
"time" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module ridgen | |
go 1.20 | |
require ( | |
github.com/go-redis/redis/v8 v8.11.5 | |
golang.org/x/sync v0.2.0 | |
) | |
require ( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"html" | |
"log" | |
"net/http" | |
"strconv" | |
"time" | |
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main; import ( "fmt"; "html"; "lo | |
"net/http"; "strconv"; "strings"; "time" | |
trolMessage struct { Target string; Count | |
func main() { controlChannel := make(chan | |
sage);workerComplechan := make(chan boo | |
PollChannel := make(chan chan bool); work | |
false; go admin(controlChannel, statusPoll | |
{ select { case respChan := <- statusPoll | |
Chan <- workerActive; case msg := <- countr | |
workerActive = true; go doStuff(msg, work |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 毎月増えるログの量 | |
log_size = 500 | |
# 何ヶ月先までのコストを計算するか | |
target_month = 12 * 5 | |
# 1ドル何円換算するか | |
exchange_rate = 145 | |
# 満何ヶ月後にnearlineに移動させるか | |
nearline_threshold = 12 | |
# 満何ヶ月後にcoldlineに移動させるか | |
coldline_threshold = 24 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
with parse_ip as ( | |
select | |
1 as k, | |
column1, | |
parse_ip(column1, 'INET'): ipv4 as ipv4, | |
power(2, 32 - parse_ip(column1, 'INET'): netmask_prefix_length) as subnet_size | |
from (values ('192.168.1.0/28'), ('172.16.1.0/29')) | |
), | |
ip_generated as ( | |
select |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select | |
TABLE_CATALOG AS DB_NAME, | |
TABLE_SCHEMA AS SCHEMA_NAME, | |
TABLE_NAME AS TABLE_NAME, | |
COLUMN_NAME AS COLUMN_NAME, | |
COLUMN_DEFAULT AS DEFAULT_VALUE, | |
IS_NULLABLE AS IS_NULLABLE, | |
CASE WHEN DATA_TYPE in ( | |
'VARCHAR', 'CHAR', ' CHARACTER', 'STRING', | |
'TEXT' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Host stg-bastion | |
User ec2-user | |
TCPKeepAlive yes | |
ProxyCommand env PATH=/usr/local/bin:~/.local/bin:$PATH /path/to/ssm-session.sh -n stg-bastion -e stg -p aws-profile -m proxy | |
Host stg-db-proxy | |
User ec2-user | |
TCPKeepAlive yes | |
ProxyCommand /path/to/ssm-session.sh -n stg-bastion -e stg -p aws-profile -m proxy | |
LocalForward 3306 10.0.1.123:3306 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.kurochan.snowpark_test | |
import com.snowflake.snowpark._ | |
import com.snowflake.snowpark.functions._ | |
import collection.JavaConverters._ | |
object Main { | |
def createSession(): Session = { | |
val configs = Map ( | |
"URL" -> "https://xxxxxxx.ap-northeast-1.aws.snowflakecomputing.com:443", |
NewerOlder