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 | |
set -eu | |
shopt -s nullglob | |
readonly base_dir=/var/lib/docker/registry | |
readonly output_dir=$(mktemp -d -t trace-images-XXXX) | |
readonly jq=/usr/bin/jq | |
readonly repository_dir=$base_dir/repositories |
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
# Instructions (for ubuntu from scratch anyway): | |
# apt-get install -y apt-transport-https | |
# sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9 | |
# sudo sh -c "echo deb https://get.docker.com/ubuntu docker main > /etc/apt/sources.list.d/docker.list" | |
# sudo apt-get update | |
# sudo apt-get install -y lxc-docker | |
# sudo -c "curl -L https://github.com/docker/fig/releases/download/1.0.1/fig-`uname -s`-`uname -m` > /usr/local/bin/fig; chmod +x /usr/local/bin/fig" | |
# ### cp this fig.yml to a directory, and cd to it ### | |
# sudo fig up -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
web: | |
image: google/cadvisor:latest | |
volumes: | |
- /:/rootfs:ro | |
- /var/run:/var/run:rw | |
- /sys:/sys:ro | |
- /var/lib/docker/:/var/lib/docker:ro | |
ports: | |
- 8888:8080 |
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
// Heya, https://forum.lowyat.net/topic/3470685/+0 | |
// Tested on clang-600.0.56 and gcc 4.8.2 | |
// TWVzc2luZyB3aXRoIG5vb2JzLCBvbmUgZXhhbXBsZSBhdCBhIHRpbWUsIHllcywgSSBoYXZlIGJldHRlciB3b3JrIHRvIGRvLg== | |
#include <stdio.h> | |
#include <limits.h> | |
struct rank { | |
char member[50]; | |
int mark; |
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
.section __TEXT,__text,regular,pure_instructions | |
.globl _doScore | |
.align 4, 0x90 | |
_doScore: ## @doScore | |
.cfi_startproc | |
## BB#0: | |
pushq %rbp | |
Ltmp3: | |
.cfi_def_cfa_offset 16 | |
Ltmp4: |
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
.PHONY: pull up start all | |
all: pull up | |
pull: | |
grep image docker-compose.yml | grep -v -E "^#" | awk '{print $$2}' | xargs -n1 docker pull | |
up: | |
docker-compose up -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
package main | |
import ( | |
"bufio" | |
"fmt" | |
"os" | |
"regexp" | |
"sort" | |
"strconv" | |
"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 ( | |
"bufio" | |
"bytes" | |
"fmt" | |
"io" | |
"regexp" | |
"strconv" | |
) |
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 ( | |
"bufio" | |
"bytes" | |
"fmt" | |
"io" | |
"regexp" | |
"strconv" | |
) |
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 ( | |
"bufio" | |
"bytes" | |
"fmt" | |
"io" | |
"regexp" | |
"strconv" | |
) |