This project was bootstrapped with Create React App.
Below you will find some information on how to perform common tasks.
You can find the most recent version of this guide here.
// https://stackoverflow.com/a/31424853/7971276 | |
const reflect = p => p.then(v => ({v, status: "resolved" }), | |
e => ({e, status: "rejected" })); | |
reflect(promise).then((v => { | |
console.log(v.status); | |
}); |
This project was bootstrapped with Create React App.
Below you will find some information on how to perform common tasks.
You can find the most recent version of this guide here.
def check(fn): | |
def run_check(expected, *args): | |
result = fn(*args) | |
if result == expected: | |
print("Test passed: " + fn.__name__ + str(args) + ' == ' + str(expected)) | |
else: | |
print("Test failed: " + fn.__name__ + str(args)) | |
print(" - Expected: " + str(expected)) | |
print(" - Received: " + str(result)) |
# interactive rebase with theirs strat (favor current branch) | |
git rebase -i -s recursive -X theirs <rebase-onto-branch> |
Tested on Ubuntu 16.04 Docker container. The Dockerfile is a single line FROM ubuntu:16.04
.
NOTE: stopping services didn't work for me for some reason. That's why there is pidof <service name> | xargs kill
after each failed service <service name> stop
to kill it.
.PHONY: clean | |
SRC = $(wildcard *.md) | |
all : $(addprefix pdf/, ${SRC:.md=.pdf}) | |
./pdf/%.pdf : %.md | |
pandoc $*.md --pdf-engine=pdflatex -o pdf/$*.pdf | |
clean : |
// for all your no frills html page needs | |
body { | |
max-width: 560px; | |
padding: 10px; | |
padding-top: 50px; | |
padding-bottom: 40px; | |
margin: 0 auto; | |
//font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; | |
font-family: "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif; |
# from: https://superuser.com/questions/91935/how-to-chmod-all-directories-except-files-recursively | |
chmod -R u+rwX,go+rX,go-w /path | |
# from: https://unix.stackexchange.com/questions/296967/how-to-recursively-remove-execute-permissions-from-files-without-touching-folder | |
chmod -x+X -R * |