This file contains 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 | |
KEY=$(xauth list | grep $(hostname) | awk '{ print $3 }' | head -n 1) | |
DCK_HOST=docker-spotify | |
xauth add $DCK_HOST/unix:0 . $KEY | |
docker run -it --rm \ | |
-v /etc/localtime:/etc/localtime:ro \ | |
-v /tmp/.X11-unix:/tmp/.X11-unix \ |
This file contains 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 | |
# Stops and removes docker containers, along with its related | |
# volumes and custom networks. If no custom networks are being used, | |
# might be better to use "docker rm -v <cont>" instead | |
usage(){ | |
echo -e "\n Usage: $(basename $0) CONTAINER [CONTAINER...]\n" | |
echo -e " Remove one or more containers, along with its assigned volumes and network interfaces\n" | |
exit 1 |
This file contains 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=wchar-tst | |
SRC=${BIN}.c | |
all: no o1 o2 o3 | |
no: ${SRC} | |
gcc -o no-${BIN} ${SRC} | |
o1: ${SRC} | |
gcc -O1 -o o1-${BIN} ${SRC} |
This file contains 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
#include <sys/time.h> | |
#include <stdlib.h> | |
#include <stdio.h> | |
#include <pthread.h> | |
#define INPUT_NUM 500000000 | |
struct timeval t1, t2, rate1, rate2; | |
void* thread_func(void* parameter){ |
This file contains 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
.text | |
.globl _start | |
start = 0 | |
max = 31 | |
_start: | |
mov x28,start /* loop index */ | |
loop: |
This file contains 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
.text | |
.globl _start | |
start = 0 /* starting value for the loop index; note that this is a symbol (constant), not a variable */ | |
max = 10 /* loop exits when the index hits this number (loop condition is i<max) */ | |
_start: | |
mov $start,%r15 /* loop index */ | |
loop: |
This file contains 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
.text | |
.globl _start | |
start = 0 /* starting value for the loop index; note that this is a symbol (constant), not a variable */ | |
max = 31 /* loop exits when the index hits this number (loop condition is i<max) */ | |
_start: | |
mov $start,%r15 /* loop index */ | |
loop: |