Skip to content

Instantly share code, notes, and snippets.

View stuinzuri's full-sized avatar

Stu Thompson stuinzuri

  • Pandora
  • Greater Atlanta Area
View GitHub Profile
@pmoust
pmoust / container-memory.sh
Created May 28, 2014 09:10
List memory usage per Docker container
#!/bin/sh
# Lists memory usage per Docker container
#
# FORMAT:
#
# IMAGE:TAG MEMORY_USAGE CONTAINER ID
for i in `find /sys/fs/cgroup/memory/docker/* -type d`; do
CONTAINER_ID=`echo $i | awk -F'/' '{print $7}'`
MEMORY_USAGE=$((`cat $i/memory.usage_in_bytes`/1024/1024))
@crawles
crawles / bq_load_tsv.sh
Created June 13, 2018 16:40
How to load a TSV file into BigQuery
# Can work for other delimiters as well
# Tab delimiter
bq load --source_format=CSV --field_delimiter=tab \
--skip_leading_rows 1 -<destination_table> <source> \
<schema>