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
docker run \ | |
--name {{printf "%q" .Name}} \ | |
{{- with .HostConfig}} | |
{{- if .Privileged}} | |
--privileged \ | |
{{- end}} | |
{{- if .AutoRemove}} | |
--rm \ | |
{{- end}} | |
{{- if .Runtime}} |
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: signal_logger_test.c | |
//how to comiple: | |
//${CC} signal_logger_test.c -o signal_logger_test | |
#include <signal.h> | |
#include <stdio.h> | |
#include <unistd.h> | |
#include <stdlib.h> | |
#include <time.h> |
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
for i in $(seq 1 10); | |
do | |
msg=$(while [ $i -gt 0 ]; do echo -n "${i: -1}"; i=$((i-1)); done;); | |
echo $msg; | |
sleep .1; | |
done |
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
# making sure that names with spaces won't be a problem | |
IFS=$'\n'; | |
# head to remove the last 2 lines (one blank and one summary) and tail to remove the first line (always a dot) of tree output | |
# TODO: what about *.PDF? | |
for i in $(tree . -f -P "*.pdf" -i | head -n -2 | tail -n +2); | |
# echo the relative file path | |
do echo -n "${i}: "; | |
# if it is a file (and not a directory), perform the conversion | |
[ -f ${i} ] && echo PDF && pdftotext "${i}" "${i}.txt"; |
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
# CC C compiler command | |
# CFLAGS C compiler flags | |
# LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a | |
# nonstandard directory <lib dir> | |
# LIBS libraries to pass to the linker, e.g. -l<library> | |
# CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if | |
# you have headers in a nonstandard directory <include dir> | |
# CPP C preprocessor | |
# CXX C++ compiler command | |
# CXXFLAGS C++ compiler flags |