commit a71c585675317663d134f00d029a28a1da48b844 Author: bel Date: Tue Sep 14 06:29:17 2021 -0600 archive diff --git a/gollum/.dockerignore b/gollum/.dockerignore new file mode 100644 index 0000000..5658bdd --- /dev/null +++ b/gollum/.dockerignore @@ -0,0 +1,4 @@ +mnt +**.sw* +**/*.sw* +*.sw* diff --git a/gollum/.gitignore b/gollum/.gitignore new file mode 100755 index 0000000..1c48463 --- /dev/null +++ b/gollum/.gitignore @@ -0,0 +1,3 @@ +mnt/ +*.sw* +goftp diff --git a/gollum/Dockerfile b/gollum/Dockerfile new file mode 100755 index 0000000..491486f --- /dev/null +++ b/gollum/Dockerfile @@ -0,0 +1,15 @@ +FROM frolvlad/alpine-glibc:alpine-3.9_glibc-2.28 + +RUN apk update; \ + apk add --no-cache ruby dcron bash cmake ruby-dev make icu-dev gcc libc-dev zlib-dev g++ openssl openssl-dev git; \ + gem install rdoc || true; \ + gem install github-linguist gollum org-ruby thin etc || true; \ + gem install rdoc || true; \ + apk del gcc g++ libc-dev zlib-dev openssl openssl-dev cmake make; +RUN gem install github-markup commonmarker || true; +# TODO what gems needed to render tables with markdown +ENV PORT=8080 +CMD [] +WORKDIR /wiki +COPY . /opt/ +ENTRYPOINT ["/bin/bash", "/opt/entrypoint.sh"] diff --git a/gollum/build_and_run.sh b/gollum/build_and_run.sh new file mode 100755 index 0000000..3ebb8c2 --- /dev/null +++ b/gollum/build_and_run.sh @@ -0,0 +1,63 @@ +#! /bin/bash + +set -e +set -u + +cd "$(dirname "${BASH_SOURCE[0]}")" +dir="$PWD" + +if [ ! -e ./goftp ]; then + pushd $GOPATH/src/local/goftp + CGO_ENABLED=0 GOOS=linux go build -o "$dir/goftp" -a -installsuffix cgo + popd +fi + +img_tag="${1:-"dev:dev"}" + +docker build -t "$img_tag" . + +mkdir -p $PWD/mnt +sudo chmod -R 777 $PWD/mnt + +rm -rf $PWD/mnt/this +mkdir -p $PWD/mnt/this/is\ a/test/path +rm -f $PWD/mnt/this/{_Header.md,file.md} +echo '# hello' > $PWD/mnt/this/file.md + +pushd $PWD/mnt +if [ ! -e Home.md ]; then + echo 'immediate pages + <> + + immediate pages from /this/ + <> + + path segments + <> + + drop down + <> + + h1, h2, h3, para +# Hello +## h2 +### h3 +paragraph + ' > Home.md +fi +popd + +function clean() { + docker rm -f gollum-dev +} +trap clean EXIT + +if [ -z "${BUILD:-""}" ]; then +docker run --rm -it \ + --name gollum-dev \ + -e PORT=38080 \ + -p 38180:38080 \ + -p 38181:38081 \ + -v $PWD/mnt:/wiki \ + $img_tag +fi diff --git a/gollum/config.rb b/gollum/config.rb new file mode 100755 index 0000000..7b47ed8 --- /dev/null +++ b/gollum/config.rb @@ -0,0 +1,72 @@ +=begin +This file can be used to (e.g.): +- alter certain inner parts of Gollum, +- extend it with your stuff. + +It is especially useful for customizing supported formats/markups. For more information and examples: +- https://github.com/gollum/gollum#config-file + +=end + +module Gollum + class Macro + class ImmediatePages < Gollum::Macro + def render(toc_root_path = nil, max_depth = 1, min_depth = 0) + if toc_root_path == nil + if @page.path == "Home.md" + toc_root_path = "" + else + toc_root_path = @page.path.sub(/\.[a-z]+$/,'/') + end + end + if toc_root_path.start_with?("/") + toc_root_path[0] = '' + end + if toc_root_path != "" and not toc_root_path.end_with?("/") + toc_root_path << '/' + end + if @wiki.pages.size > 0 + list_items = @wiki.pages.map do |page| + if @page.url_path != page.url_path and page.url_path.start_with?(toc_root_path) + path_display = page.url_path_display.sub(toc_root_path.gsub("-", " "), "").sub(/^\//,'') + depth = path_display.count("/") + if depth.to_i < max_depth.to_i and depth.to_i >= min_depth.to_i + "
  • #{path_display}
  • " + end + end + end + result = "
      #{list_items.join}
    " + end + title = toc_root_path + "
    #{title}
    #{result}
    " + end + end + class PathSegments < Gollum::Macro + def render(append = "") + segments = @page.path.split('/') + segments = segments.first(segments.size - 1) + if append != "" + segments << append + end + full = "" + list_items = segments.map do |segment| + full = "#{full}/#{segment}" + " / #{segment}" + end + list_items.insert(0, " / Home") + list_items << " / " + "
    #{list_items.join}
    " + end + end + class DropDown < Gollum::Macro + def render(summary, detail) + "
    #{summary}
    #{detail}
    #{title}
    .actions +> .minibutton:nth-last-child(-n+2) +, #head +> .actions +> .minibutton:nth-child(6) +, #head +> .actions +> .minibutton:nth-child(4) +{ + display: none; +} + +body +{ + background-color: #222; + -webkit-filter: invert(85%); + filter: invert(85%); +} + +img +{ + -webkit-filter: invert(100%); + filter: invert(100%); +} + +.img-drop-down +{ + width: 100%; +} + +.img-drop-down +> img +{ + text-align: center; + margin: 0 auto; + padding: 1em 0; + max-width: 100%; + max-height: 400px; + display: block; +} + +.markdown-body +h1 +{ + border-top: 1px solid #ddd; + padding-top: 10px; +} + +#head +> h1 +{ + /*display: none;*/ + width: 100%; +} + +summary +> h1 +, summary +> h2 +, summary +> h3 +, summary +> h4 +{ + display: inline-block; +} diff --git a/gollum/custom.js b/gollum/custom.js new file mode 100755 index 0000000..de4831d --- /dev/null +++ b/gollum/custom.js @@ -0,0 +1,13 @@ +function load_segment() { + var elem = document.getElementById("last_segment") + if (elem) { + var arr = window.location.href.split('/') + elem.innerHTML = arr[arr.length-1] + elem.setAttribute("href", window.location.href.split('#')[0]) + } else { + setTimeout(function() { + load_segment() + }, 50) + } +} +load_segment() diff --git a/gollum/entrypoint.sh b/gollum/entrypoint.sh new file mode 100755 index 0000000..41be7e1 --- /dev/null +++ b/gollum/entrypoint.sh @@ -0,0 +1,27 @@ +#! /bin/bash + +function main() { + set -e + + cd /wiki + git init || true + crontab /opt/routine.cron + bash /opt/index.sh + + /opt/goftp \ + -port $((PORT+1)) \ + -root /wiki/uploads-ftp \ + & gollum \ + --port $PORT \ + --no-live-preview \ + --config /opt/config.rb \ + --collapse-tree \ + --allow-uploads=dir \ + --css \ + --js \ + "$@" +} + +if [ "$0" == "${BASH_SOURCE[0]}" ]; then + main "$@" +fi diff --git a/gollum/index.sh b/gollum/index.sh new file mode 100755 index 0000000..8a53dde --- /dev/null +++ b/gollum/index.sh @@ -0,0 +1,88 @@ +#! /bin/bash + +function main() { + set -e + + fill_missing_files + format_files + init_git +} + +function fill_missing_files() { + pushd "${1:-/wiki}" > /dev/null 2>&1 + fill_if_missing ./Home.md + fill_if_missing ./_Header.md + find ./* -type d | while read -r i; do + i="${i%/}" + fill_if_missing "$i.md" + fill_if_missing "$i/_Header.md" + done + rm -f .git/hooks/pre-commit || true + for i in .git/hooks/pre-commit custom.css custom.js; do + fill_if_missing ./$i "$(cat /opt/${i##*/})" + done + mkdir -p ./uploads-ftp + cp /opt/favicon.ico . || true + popd > /dev/null 2>&1 +} + +function format_files() { + pushd ${1:-/wiki} > /dev/null 2>&1 + + local patterns=('^[0-9][0-9]*\. *' ' 1. ') + local f="/tmp/switch" + + find . -type f -name "*.md" | grep -v '\/_[^\/]*.md' | while read -r path; do + for ((i=0; i<${#patterns[@]}; i+=2)); do + local from="${patterns[i]}" + local to="${patterns[i+1]}" + if [ -n "$(grep "${from// /.}" "$path")" ]; then + cat "$path" \ + | sed "s/$from/$to/g" \ + > "$f" + cp "$f" "$path" + fi + done + done + + rm -f "$f" + + popd > /dev/null 2>&1 +} + +function init_git() { + pushd ${1:-/wiki} > /dev/null 2>&1 + git config user.email bel@bel.bel + git config user.name bel + git add -A :/ + if [ "${JUST_ADD:-""}" != "true" ]; then + JUST_ADD=true git commit --author="auto <>" -m "routine" || true + fi + popd > /dev/null 2>&1 +} + +function fill_if_missing() { + local relative_path="$1" + shift + mkdir -p "$(dirname "$relative_path")" + local full_path="$(printf "%s/%s" \ + "$(realpath \ + "$(dirname "$relative_path")" \ + )" \ + "$(basename "$relative_path")" \ + )" + if [ ! -e "$full_path" ]; then + if [ "$#" -gt 0 ]; then + echo "$@" > "$full_path" + elif [[ "$relative_path" == *"_Header.md" ]]; then + echo "<>" > "$full_path" + else + echo "<>" > "$full_path" + fi + fi + chmod +x "$full_path" +} + +if [ "$0" == "${BASH_SOURCE[0]}" ]; then + main "$@" +fi diff --git a/gollum/pre-commit b/gollum/pre-commit new file mode 100755 index 0000000..5f863e9 --- /dev/null +++ b/gollum/pre-commit @@ -0,0 +1,5 @@ +#!/bin/sh + +echo DO INDEX.sh; +git status; +JUST_ADD=true bash /opt/index.sh || true; diff --git a/gollum/review b/gollum/review new file mode 100755 index 0000000..137c4be --- /dev/null +++ b/gollum/review @@ -0,0 +1 @@ +ruby scripting is fantastic and fun, but tags/metadata are hard diff --git a/gollum/routine.cron b/gollum/routine.cron new file mode 100755 index 0000000..5935fd2 --- /dev/null +++ b/gollum/routine.cron @@ -0,0 +1 @@ +0 0/2 * * * /bin/bash /opt/index.sh diff --git a/kanboard/kanboard/kanboard.sh b/kanboard/kanboard/kanboard.sh new file mode 100755 index 0000000..ebb7ac0 --- /dev/null +++ b/kanboard/kanboard/kanboard.sh @@ -0,0 +1,9 @@ +#! /bin/bash + +echo USER admin PASS admin ON 8036 + +docker run --rm -it \ + --name kanboard \ + -p 8036:80 \ + -v $(pwd)/kanboard-data:/var/www/app/data \ + kanboard/kanboard:v1.2.5 diff --git a/kanboard/kanboard/kanboard_is_win b/kanboard/kanboard/kanboard_is_win new file mode 100755 index 0000000..e69de29 diff --git a/kanboard/kanboarddocker/Dockerfile b/kanboard/kanboarddocker/Dockerfile new file mode 100644 index 0000000..be4428e --- /dev/null +++ b/kanboard/kanboarddocker/Dockerfile @@ -0,0 +1,36 @@ +FROM kanboard/kanboard:v1.2.14 + +RUN apk update \ + && apk add --no-cache \ + postgresql \ + dcron \ + curl \ + && mkdir -p /var/lib/postgresql/12/main \ + && chown -R postgres:postgres /var/lib/postgresql \ + && chmod -R 750 /var/lib/postgresql \ + && su postgres -c "initdb -D /var/lib/postgresql/12/main/" \ + && mkdir -p /var/run/postgresql/ \ + && chown -R postgres:postgres /var/run/postgresql \ + && chmod -R 750 /var/run/postgresql +RUN su postgres -c 'postgres --config-file=/var/lib/postgresql/12/main/postgresql.conf -D /var/lib/postgresql/12/main' \ + & until su postgres -c 'psql --command "CREATE USER admin WITH SUPERUSER PASSWORD '"'"'admin'"'"';"'; do sleep 1; done \ + && su postgres -c 'psql --command "CREATE DATABASE db;"' \ + && su postgres -c 'psql --command "GRANT ALL PRIVILEGES ON DATABASE db TO admin;"' \ + && kill %1 \ + && wait + +RUN mkdir -p \ + /etc/nginx/ssl \ + /var/www/app/data \ + /var/www/app/plugins \ + && chown -R nginx:nginx /var/www/app + +RUN echo '0 */4 * * * bash -c "true; bash /backup.sh &>> /tmp/backup.log"' >> /etc/crontabs/root + +ENV DATABASE_URL=postgres://admin:admin@127.0.0.1/db +COPY backup.sh /backup.sh +COPY restore.sh /restore.sh + +CMD [] +ENTRYPOINT ["bash", "-c", "true; clean() { bash /backup.sh; echo cleaned; exit 0; }; set -e; crond; (set -m; su postgres -c 'postgres --config-file=/var/lib/postgresql/12/main/postgresql.conf -D /var/lib/postgresql/12/main' & wait) &> /var/log/postgres.log & disown; until psql $DATABASE_URL < /dev/null; do sleep 1; done; bash /restore.sh; trap clean EXIT ERR INT; echo rm and start; rm -rf /etc/services.d/cron; bash /usr/local/bin/entrypoint.sh"] + diff --git a/kanboard/kanboarddocker/backup.sh b/kanboard/kanboarddocker/backup.sh new file mode 100644 index 0000000..b0936ec --- /dev/null +++ b/kanboard/kanboarddocker/backup.sh @@ -0,0 +1,14 @@ +#! /bin/bash + +date +mkdir -p /mnt/save +d=/mnt/save/$(date +%Y-%m-%d-%H-%M-%S).dump +echo backing up as $d... +pg_dump $DATABASE_URL --clean \ + > $d \ + || rm -f $d +total=$(ls /mnt/save/* | wc -l) +to_del=$((total-${BACKUPS:-10})) +if ((to_del>0)); then + rm -f $(ls /mnt/save/* | head -n $to_del) +fi diff --git a/kanboard/kanboarddocker/build.sh b/kanboard/kanboarddocker/build.sh new file mode 100644 index 0000000..937ddaa --- /dev/null +++ b/kanboard/kanboarddocker/build.sh @@ -0,0 +1 @@ +docker build -t bel/kanboard:v0.1 . diff --git a/kanboard/kanboarddocker/postgresql.conf b/kanboard/kanboarddocker/postgresql.conf new file mode 100644 index 0000000..beb4a3c --- /dev/null +++ b/kanboard/kanboarddocker/postgresql.conf @@ -0,0 +1,24 @@ +data_directory = '/var/lib/postgresql/10/main' # use data in another directory +hba_file = '/etc/postgresql/10/main/pg_hba.conf' # host-based authentication file +ident_file = '/etc/postgresql/10/main/pg_ident.conf' # ident configuration file +external_pid_file = '/var/run/postgresql/10-main.pid' # write an extra PID file +port = 5432 # (change requires restart) +max_connections = 100 # (change requires restart) +unix_socket_directories = '/var/run/postgresql' # comma-separated list of directories +ssl = on +ssl_cert_file = '/etc/ssl/certs/ssl-cert-snakeoil.pem' +ssl_key_file = '/etc/ssl/private/ssl-cert-snakeoil.key' +shared_buffers = 128MB # min 128kB +dynamic_shared_memory_type = posix # the default is the first option +log_line_prefix = '%m [%p] %q%u@%d ' # special values: +log_timezone = 'America/Denver' +cluster_name = '10/main' # added to process titles if nonempty +stats_temp_directory = '/var/run/postgresql/10-main.pg_stat_tmp' +datestyle = 'iso, mdy' +timezone = 'America/Denver' +lc_messages = 'C.UTF-8' # locale for system error message +lc_monetary = 'C.UTF-8' # locale for monetary formatting +lc_numeric = 'C.UTF-8' # locale for number formatting +lc_time = 'C.UTF-8' # locale for time formatting +default_text_search_config = 'pg_catalog.english' +include_dir = 'conf.d' # include files ending in '.conf' from diff --git a/kanboard/kanboarddocker/restore.sh b/kanboard/kanboarddocker/restore.sh new file mode 100644 index 0000000..81bdc84 --- /dev/null +++ b/kanboard/kanboarddocker/restore.sh @@ -0,0 +1,18 @@ +#! /bin/bash + +until psql $DATABASE_URL < /dev/null; do + sleep 1 +done +for f in /mnt/save/$(ls /mnt/save | sort -r); do + echo restore $f + psql $DATABASE_URL < $f &> /dev/null + ret=$? + echo restore result: $ret + # TODO server isn't started to assert db is OK + exit $ret + if [ $ret == 0 ]; then + if curl -sS -i localhost:80 | grep login; then + exit $ret + fi + fi +done diff --git a/kanboard/restya/build_and_run.sh b/kanboard/restya/build_and_run.sh new file mode 100755 index 0000000..8338213 --- /dev/null +++ b/kanboard/restya/build_and_run.sh @@ -0,0 +1,3 @@ +#! /bin/bash + +docker-compose up diff --git a/kanboard/restya/docker-compose.yaml b/kanboard/restya/docker-compose.yaml new file mode 100755 index 0000000..0634be0 --- /dev/null +++ b/kanboard/restya/docker-compose.yaml @@ -0,0 +1,33 @@ +version: '2' +volumes: + restyaboard_db: + driver: local + restyaboard_media: + driver: local +services: + restyaboard: + image: restyaplatform/restyaboard:dev + environment: + POSTGRES_DB: restyaboard + POSTGRES_HOST: postgres + POSTGRES_PASSWORD: admin + POSTGRES_USER: admin + SMTP_DOMAIN: domain + SMTP_USERNAME: user + SMTP_PASSWORD: pass + SMTP_SERVER: server + SMTP_PORT: 465 + TZ: Etc/UTC + volumes: + - restyaboard_media:/usr/share/nginx/html/media + ports: + - "8344:80" + postgres: + image: postgres:9-alpine + environment: + POSTGRES_DB: restyaboard + POSTGRES_HOST: postgres + POSTGRES_PASSWORD: admin + POSTGRES_USER: admin + volumes: + - restyaboard_db:/var/lib/postgresql/data diff --git a/kanboard/restya/review b/kanboard/restya/review new file mode 100755 index 0000000..aa0ab02 --- /dev/null +++ b/kanboard/restya/review @@ -0,0 +1 @@ +cannot sign up/log in without valid smtp diff --git a/kanboard/tracks/build_and_run.sh b/kanboard/tracks/build_and_run.sh new file mode 100755 index 0000000..9e479c3 --- /dev/null +++ b/kanboard/tracks/build_and_run.sh @@ -0,0 +1,11 @@ +#! /bin/bash + +img="staannoe/tracks" +tag="latest" +docker pull $img:$tag + +docker run --rm -it \ + --name ${img##*/} \ + -p 8344:80 \ + -v $(pwd)/mnt:/data \ + $img:$tag diff --git a/kanboard/tracks/review b/kanboard/tracks/review new file mode 100755 index 0000000..39bceeb --- /dev/null +++ b/kanboard/tracks/review @@ -0,0 +1 @@ +too much, red* was better diff --git a/leanote/.gitignore b/leanote/.gitignore new file mode 100755 index 0000000..c6c4427 --- /dev/null +++ b/leanote/.gitignore @@ -0,0 +1,2 @@ +data +files diff --git a/leanote/Dockerfile b/leanote/Dockerfile new file mode 100755 index 0000000..6dc30d1 --- /dev/null +++ b/leanote/Dockerfile @@ -0,0 +1,54 @@ +FROM frolvlad/alpine-glibc:alpine-3.9_glibc-2.28 as builder + +RUN apk add --no-cache \ + libc-dev \ + gcc \ + go \ + git \ + mongodb \ + mongodb-tools + +RUN mkdir -p /go/src \ + && mkdir -p /go/pkg \ + && mkdir -p /go/bin + +ENV GOPATH=/go + +RUN go get github.com/revel/cmd/revel \ + && go get github.com/leanote/leanote/app \ + && go get github.com/golang/dep/cmd/dep \ + && cd $GOPATH/src/github.com/revel/cmd/revel && go install \ + && cd $GOPATH/src/github.com/golang/dep/cmd/dep && go install \ + && sed -i 's/Get[\t ][ \t]*\/[\t ][\t ]*.*$/Get \/ Auth.Login/' $GOPATH/src/github.com/leanote/leanote/conf/routes + +RUN mkdir -p /mnt/data \ + && mongod --dbpath /mnt/data \ + & mongorestore -h localhost -d leanote --dir $GOPATH/src/github.com/leanote/leanote/mongodb_backup/leanote_install_data/ \ + && kill %1 + +FROM frolvlad/alpine-glibc:alpine-3.9_glibc-2.28 + +WORKDIR /opt +ENV GOPATH=/go +RUN apk add --no-cache \ + fcron \ + bash \ + mongodb \ + go \ + gcc libc-dev \ + && crond \ + && addgroup -S user && adduser -S -G user user \ + && mkdir -p \ + /mnt/data \ + $GOPATH/src/github.com/leanote/leanote/files + +COPY --from=builder /go/src $GOPATH/src +COPY --from=builder /go/pkg $GOPATH/pkg +COPY --from=builder /go/bin $GOPATH/bin +COPY --from=builder /mnt/data /mnt/data +ENV PATH=${PATH}:$GOPATH/bin +RUN chown -R user /mnt $GOPATH + +USER user +CMD [] +ENTRYPOINT ["bash", "-c", "mongod --dbpath /mnt/data & revel run github.com/leanote/leanote"] diff --git a/leanote/build_and_run.sh b/leanote/build_and_run.sh new file mode 100755 index 0000000..0f5b009 --- /dev/null +++ b/leanote/build_and_run.sh @@ -0,0 +1,28 @@ +#! /bin/bash + +set -e + +img="bel/leanote" +tag="v0.0" + +docker build -t $img:$tag . + +if [ ! -d "$PWD/data" ]; then + mkdir "$PWD/data" "$PWD/files" + sudo chmod -R 777 "$PWD/data" + docker run --rm -it \ + --entrypoint cp \ + -v "$(pwd):/mnt2" \ + $img:$tag \ + -r /mnt/data /mnt2/ +fi + +sudo chmod -R 777 "$PWD/data" "$PWD/files" + +docker run --rm -it \ + --name ${img##*/} \ + -p 9000:9000 \ + -v "$(pwd)/data:/mnt/data" \ + -v "$(pwd)/files:/go/src/github.com/leanote/leanote/files" \ + $img:$tag + diff --git a/leanote/review b/leanote/review new file mode 100755 index 0000000..3c0472b --- /dev/null +++ b/leanote/review @@ -0,0 +1 @@ +requires mongo and only mongo. Defer. diff --git a/mytinytodo/build_and_run.sh b/mytinytodo/build_and_run.sh new file mode 100755 index 0000000..7908103 --- /dev/null +++ b/mytinytodo/build_and_run.sh @@ -0,0 +1,15 @@ +#! /bin/bash + +img="php" +tag="7.1.26-alpine3.9" +docker pull $img:$tag + +cp $PWD/entrypoint.sh $PWD/mnt/entrypoint.sh + +docker run --rm -it \ + --entrypoint sh \ + --name ${img##*/} \ + -p 8345:8080 \ + -v $(pwd)/mnt:/mnt \ + $img:$tag \ + /mnt/entrypoint.sh diff --git a/mytinytodo/entrypoint.sh b/mytinytodo/entrypoint.sh new file mode 100755 index 0000000..00d139d --- /dev/null +++ b/mytinytodo/entrypoint.sh @@ -0,0 +1,28 @@ +#! /bin/sh + +cd /mnt + +apk add --no-cache \ + ca-certificates \ + bash \ + git + +#if [ ! -d ./mytinytodo ]; then +if [ ! -d ./mytinytodo2 ]; then + #wget https://bitbucket.org/maxpozdeev/mytinytodo/downloads/mytinytodo-v1.4.3.zip + #unzip mytinytodo-v1.4.3.zip + git clone https://github.com/ptrckkk/myTinyTodo.git mytinytodo2 +fi + +if [ -z "$(grep invert ./mytinytodo2/themes/default/style.css)" ]; then + echo ' + body { + filter: invert(80%); + background-color: #222; + } + ' | tr '\n' ' ' >> ./mytinytodo2/themes/default/style.css +fi + +#cd mytinytodo +cd mytinytodo2 +php -S 0.0.0.0:8080 diff --git a/mytinytodo/mnt/entrypoint.sh b/mytinytodo/mnt/entrypoint.sh new file mode 100755 index 0000000..4aee4f7 --- /dev/null +++ b/mytinytodo/mnt/entrypoint.sh @@ -0,0 +1,23 @@ +#! /bin/sh + +cd /mnt + +apk add --no-cache \ + ca-certificates \ + bash \ + git + +#if [ ! -d ./mytinytodo ]; then +if [ ! -d ./mytinytodo2 ]; then + #wget https://bitbucket.org/maxpozdeev/mytinytodo/downloads/mytinytodo-v1.4.3.zip + #unzip mytinytodo-v1.4.3.zip + git clone https://github.com/ptrckkk/myTinyTodo.git mytinytodo2 +fi + +if [ -z "$(grep invert ./mytinytodo2/themes/default/style.css)" ]; then + echo 'body { filter: invert(80%); background-color: #222; }' >> ./mytinytodo2/themes/default/style.css +fi + +#cd mytinytodo +cd mytinytodo2 +php -S 0.0.0.0:8080 diff --git a/no/mininote/build_and_run.sh b/no/mininote/build_and_run.sh new file mode 100755 index 0000000..985e371 --- /dev/null +++ b/no/mininote/build_and_run.sh @@ -0,0 +1,16 @@ +#! /bin/bash + +img="bel/mininote" +tag="latest" + +cd "$(dirname "${BASH_SOURCE[0]}")" +git clone https://github.com/n1try/mininote +pushd ./mininote +docker build -t $img:$tag . +popd + +docker run --rm -it \ + --name ${img##*/} \ + -p 8344:3000 \ + -v $(pwd)/mnt:/app/data \ + $img:$tag diff --git a/no/mininote/review b/no/mininote/review new file mode 100755 index 0000000..6668880 --- /dev/null +++ b/no/mininote/review @@ -0,0 +1 @@ +cute but not super effective--each notebook is a user/pass and it's just a flat sheet to manually save diff --git a/no/tiddlywiki/review b/no/tiddlywiki/review new file mode 100755 index 0000000..ab1f700 --- /dev/null +++ b/no/tiddlywiki/review @@ -0,0 +1,5 @@ +ehhhhh + +- supports everything except nested storage +- can manually list and script titles but tags was a nightmare +- got stuck and froze every so often diff --git a/no/trilium/build_and_run.sh b/no/trilium/build_and_run.sh new file mode 100755 index 0000000..d06fb2d --- /dev/null +++ b/no/trilium/build_and_run.sh @@ -0,0 +1,11 @@ +#! /bin/bash + +img="zadam/trilium" +tag="0.29.1" +docker pull $img:$tag + +docker run --rm -it \ + --name ${img##*/} \ + -p 8344:8080 \ + -v $(pwd)/mnt:/root/trilium-data \ + $img:$tag diff --git a/no/trilium/review b/no/trilium/review new file mode 100755 index 0000000..78d6d2a --- /dev/null +++ b/no/trilium/review @@ -0,0 +1,6 @@ +shit because it doesnt work on firefox + +Great aside from shit mobile view. Good for gcp! + +SO close, cannot mark as complete +