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
| FROM postgres:14 | |
| ENV POSTGRES_PASSWORD=postgres | |
| ENV POSTGRES_USER=postgres | |
| # Fixed ownership and mode | |
| RUN chown root:ssl-cert /etc/ssl/private/ssl-cert-snakeoil.key | |
| RUN chmod 740 /etc/ssl/private/ssl-cert-snakeoil.key | |
| CMD ["-c", "ssl=on", "-c", "ssl_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem", "-c", "ssl_key_file=/etc/ssl/private/ssl-cert-snakeoil.key"] |
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
| # https://twitter.com/hiroysato/status/1339925551167893504 | |
| FROM openjdk:8-slim | |
| ENV LANG=C.UTF-8 \ | |
| PATH_TO_EMBULK=/opt/embulk \ | |
| PATH=${PATH}:/opt/embulk | |
| # Change timezone | |
| RUN ln -sf /usr/share/zoneinfo/Asia/Tokyo /etc/localtime |
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 subset as ( | |
| select '๏ผ๏ผ๏ผโ๏ผ๏ผ๏ผ๏ผ' as x union all -- 123โ4567 | |
| select 'ใถ' as x union all -- ใใฏใฟใผใซ | |
| select 'ใฑใฒ' as x union all -- (ๆ ช)(ๆ) | |
| select '๏ฝฑ๏ฝฒ๏ฝณ๏ฝด๏ฝต๏ผก๏ผข๏ผฃ๏ฝ๏ฝ๏ฝโ ' as x union all -- ใขใคใฆใจใชabcabc1 | |
| select 'ใใ ใถ' as x union all -- ใใ ใ | |
| select '()๏ผ๏ผ' as x union all -- ()() | |
| select 'ABCabc' | |
| ) | |
| select x, |
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 ( | |
| "context" | |
| "fmt" | |
| "cloud.google.com/go/bigquery" | |
| ) | |
| // Item represents a row item. |
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 transformer | |
| import ( | |
| "bufio" | |
| "encoding/csv" | |
| "encoding/json" | |
| "fmt" | |
| "io" | |
| "os" | |
| ) |
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 ( | |
| "cloud.google.com/go/bigquery" | |
| "context" | |
| "fmt" | |
| "google.golang.org/api/iterator" | |
| "log" | |
| "os" | |
| "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 ( | |
| "encoding/csv" | |
| "encoding/json" | |
| "fmt" | |
| "io" | |
| "log" | |
| "strings" | |
| ) |
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 ( | |
| "encoding/json" | |
| "errors" | |
| "io/ioutil" | |
| "log" | |
| ) | |
| type Runner interface { |
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 ( | |
| "cloud.google.com/go/bigquery" | |
| "context" | |
| "fmt" | |
| "google.golang.org/api/option" | |
| ) | |
| func showBqDatasets() { |
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" | |
| "math/rand" | |
| "time" | |
| ) | |
| func Swap(arr *[]int, i int, j int) { | |
| (*arr)[i], (*arr)[j] = (*arr)[j], (*arr)[i] |
NewerOlder