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
# /etc/cni/net.d/10-canal.conf | |
{ | |
"name": "canal", | |
"type": "flannel", | |
"delegate": { | |
"type": "calico", | |
"etcd_endpoints": "...", | |
"log_level": "info", | |
"policy": { | |
"type": "k8s", |
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
{ | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Sid": ..., | |
"Effect": "Allow", | |
"Action": [ | |
"sts:GetSessionToken", | |
"iam:GetUser", | |
"iam:ListMFADevices" |
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
export GCLOUD_PROJECT="source-project-id" | |
export GOOGLE_APPLICATION_CREDENTIALS="./service-account-key.json" | |
java -cp big-replicate-standalone.jar \ | |
uswitch.big_replicate.sync \ | |
--source-project source-project-id \ | |
--source-dataset 98909919 \ | |
--destination-project destination-project-id \ | |
--destination-dataset 98909919 \ | |
--table-filter "ga_sessions_\d+" \ |
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
coreos: | |
units: | |
- name: systemd-journald.service | |
drop-ins: | |
- name: 10-override-tty.conf | |
content: | | |
[Journal] | |
TTYPath=/dev/null | |
command: start |
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
ERROR: F0417 13:59:03.614902 3144 create.go:50] Client error: Service "myservice" is invalid: spec.ports: required value |
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
(defn download-report [{:keys [client date] :as state}] | |
;; snip | |
(assoc state :file downloaded-file)) | |
(defn upload-to-s3 [{:keys [file] :as state}] | |
;; snip | |
(assoc state :bucket bucket :key key)) | |
(defrecord Transition [op next-state]) |
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
(defn download-report [client date] | |
(try | |
;; snip | |
(catch Exception e | |
(Thread/sleep 10000) | |
(download-report client date)))) | |
(defn upload-to-s3 [file] | |
(try | |
;; snip |
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
(defn -main [] | |
;; snip | |
(doseq [[date client] requests] | |
(try | |
(let [file (download-report client date)] | |
(upload-to-s3 file)) | |
(catch Exception e | |
(log/error e) | |
(System/exit 1))))) |
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
# memory profile | |
# $ sudo jmap -J-d64 -F -histo <PID> | |
num #instances #bytes Class description | |
-------------------------------------------------------------------------- | |
1: 947931 162798664 char[] | |
2: 45135 106753792 byte[] | |
3: 214155 68806464 int[] | |
4: 895438 35817520 java.util.LinkedHashMap$Entry |
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 | |
cast(use2.usename as varchar(50)) as owner, | |
pgc.oid, | |
trim(pgdb.datname) as Database, | |
trim(pgn.nspname) as Schema, | |
trim(a.name) as Table, | |
b.mbytes, | |
a.rows | |
from | |
(select db_id, id, name, sum(rows) as rows |