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
| #!/usr/bin/env bash | |
| # | |
| # These are the commands available in an .envrc context | |
| # | |
| # ShellCheck exceptions: | |
| # | |
| # SC1090: Can't follow non-constant source. Use a directive to specify location. | |
| # SC1091: Not following: (file missing) | |
| # SC1117: Backslash is literal in "\n". Prefer explicit escaping: "\\n". | |
| # SC2059: Don't use variables in the printf format string. Use printf "..%s.." "$foo". |
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
| #!/bin/bash | |
| main() { | |
| local url=${1} | |
| case "$OSTYPE" in | |
| darwin*) | |
| open "${url}" ;; | |
| mysys*) | |
| exe /c start "${url/&/^&}" ;; |
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
| aliases: | |
| pv: pr view --web | |
| land: pr merge --squash --delete-branch | |
| config-export: '!cat ~/.config/gh/config.yml | jq --raw-input --slurp -r "{files: {\"config.yml\": {content: .}}}" | gh api -X PATCH /gists/ba5517759522578585830221e88c1658 --input - | jq .html_url | xargs open' | |
| clone: |- | |
| !mkdir -p "${CODE}/$1" && gh repo clone "$1" "${CODE}/$1" | |
| v: repo view --web |
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
| $ osascript -e 'tell application "System Events" to get the name of every login item' | |
| Steam, Google Drive File Stream | |
| $ osascript -e 'tell application "System Events" to delete login item "Steam"' | |
| $ osascript -e 'tell application "System Events" to get the name of every login item' | |
| Google Drive File Stream |
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
| { | |
| "name": "Apache Samza", | |
| "description": "", | |
| "elements": [ | |
| { | |
| "tag": "Apache Samza - Job", | |
| "stroke": "#693cc5", | |
| "color": "#693cc5", | |
| "icon": "http://samza.apache.org/img/samza-just-logo-transparent.png" | |
| } |
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
| #!/bin/bash | |
| bazel query 'kind(".*binary rule", //...)' --output=label |
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
| import org.jetbrains.exposed.sql.Database | |
| import org.jetbrains.exposed.sql.vendors.DataTypeProvider | |
| import org.jetbrains.exposed.sql.vendors.FunctionProvider | |
| import org.jetbrains.exposed.sql.vendors.VendorDialect | |
| import java.util.* | |
| object ClickHouseDataTypeProvider : DataTypeProvider() { | |
| override fun binaryType(): String = "String" | |
| override fun binaryType(length: Int): String = "FixedString($length)" | |
| override fun blobType(): String = "String" |
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
| #!/usr/bin/env bash | |
| # Exit on error. Append "|| true" if you expect an error. | |
| set -o errexit | |
| # Exit on error inside any functions or subshells. | |
| set -o errtrace | |
| # Do not allow use of undefined vars. Use ${VAR:-} to use an undefined VAR | |
| set -o nounset | |
| # Catch the error in case mysqldump fails (but gzip succeeds) in `mysqldump |gzip` | |
| set -o pipefail | |
| # Turn on traces, useful while debugging but commented out by default |
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
| SHELL := bash | |
| .ONESHELL: | |
| .SHELLFLAGS := -eu -o pipefail -c | |
| .DELETE_ON_ERROR: | |
| MAKEFLAGS += --warn-undefined-variables | |
| MAKEFLAGS += --no-builtin-rules | |
| help: ## displays available make targets | |
| @grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' | |
| .PHONY: help |
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, | |
| name, | |
| formatReadableSize(c) compressed, | |
| formatReadableSize(u) uncompressed, | |
| floor((c/u) * 100, 4) percent | |
| FROM ( | |
| SELECT table, | |
| name, | |
| sum(data_compressed_bytes) c, | |
| sum(data_uncompressed_bytes) u |