Loading Dockerfile +2 −0 Original line number Diff line number Diff line Loading @@ -80,3 +80,5 @@ COPY sketches /sketches COPY blends /blends COPY jslib /jslib RUN chmod +x /scripts/hash.sh /scripts/testbase.sh && ln -st / /scripts/hash.sh RUN npm install -g serve docs/credits.ad +1 −0 Original line number Diff line number Diff line Loading @@ -3,6 +3,7 @@ .Nika Kunzová ** Dark and Stormy ** TimeyWimey ** Late Night City Stories .Adam Štěpánek ** Hashclock Loading run.ps1 +4 −2 Original line number Diff line number Diff line Loading @@ -18,9 +18,11 @@ $hash = (Get-FileHash -Path $path -Algorithm SHA256).Hash.ToLower() # create a container if ($debug) { $container = (docker create -it --network none -e WIDTH=$width -e HEIGHT=$height -e DEBUG=true hash /hash.sh $hash) $container = (docker create -it --network none ` -e WIDTH=$width -e HEIGHT=$height -e DEBUG=true hash /hash.sh $hash) } else { $container = (docker create -it --network none -e WIDTH=$width -e HEIGHT=$height hash /hash.sh $hash) $container = (docker create -it --network none ` -e WIDTH=$width -e HEIGHT=$height hash /hash.sh $hash) } if (-Not($?)) { Write-Host "Failed to create a Docker container." Loading run.shdeleted 100755 → 0 +0 −13 Original line number Diff line number Diff line #!/bin/bash cat > hash-input.bin ID=$(sha256sum hash-input.bin | cut -d " " -f1) ID=${ID:0:8} CONTAINER=$(docker create -it hash /hash.sh) echo "Container $CONTAINER" docker cp hash-input.bin $CONTAINER:/input docker start -a $CONTAINER docker cp ${CONTAINER}:/out/hash.bmp hash_$ID.bmp docker cp ${CONTAINER}:/out/hash.mp4 hash_$ID.mp4 docker stop $CONTAINER && docker rm $CONTAINER scripts/libhash.sh +6 −1 Original line number Diff line number Diff line Loading @@ -95,8 +95,11 @@ pdebug() { runp5() { hrandom serve -l 5000 "/" >/dev/null 2>&1 & SERVE_PID=$! P5HASH=$HRANDOM firefox -P hash "file:///sketches/$1/$1.html?hash=$P5HASH&width=$WIDTH&height=$HEIGHT" >/dev/null 2>&1 & firefox -P hash "http://localhost:5000/sketches/$1/$1?hash=$P5HASH&width=$WIDTH&height=$HEIGHT" >/dev/null 2>&1 & FIREFOX_PID=$! Loading @@ -108,6 +111,7 @@ runp5() { sleep 1; done kill $FIREFOX_PID kill $SERVE_PID } runpde() { Loading Loading @@ -180,5 +184,6 @@ runrecursive() { else LAYOUT_DEPTH=$(($LAYOUT_DEPTH - 1)) runlayout LAYOUT_DEPTH=$(($LAYOUT_DEPTH + 1)) fi } Loading
Dockerfile +2 −0 Original line number Diff line number Diff line Loading @@ -80,3 +80,5 @@ COPY sketches /sketches COPY blends /blends COPY jslib /jslib RUN chmod +x /scripts/hash.sh /scripts/testbase.sh && ln -st / /scripts/hash.sh RUN npm install -g serve
docs/credits.ad +1 −0 Original line number Diff line number Diff line Loading @@ -3,6 +3,7 @@ .Nika Kunzová ** Dark and Stormy ** TimeyWimey ** Late Night City Stories .Adam Štěpánek ** Hashclock Loading
run.ps1 +4 −2 Original line number Diff line number Diff line Loading @@ -18,9 +18,11 @@ $hash = (Get-FileHash -Path $path -Algorithm SHA256).Hash.ToLower() # create a container if ($debug) { $container = (docker create -it --network none -e WIDTH=$width -e HEIGHT=$height -e DEBUG=true hash /hash.sh $hash) $container = (docker create -it --network none ` -e WIDTH=$width -e HEIGHT=$height -e DEBUG=true hash /hash.sh $hash) } else { $container = (docker create -it --network none -e WIDTH=$width -e HEIGHT=$height hash /hash.sh $hash) $container = (docker create -it --network none ` -e WIDTH=$width -e HEIGHT=$height hash /hash.sh $hash) } if (-Not($?)) { Write-Host "Failed to create a Docker container." Loading
run.shdeleted 100755 → 0 +0 −13 Original line number Diff line number Diff line #!/bin/bash cat > hash-input.bin ID=$(sha256sum hash-input.bin | cut -d " " -f1) ID=${ID:0:8} CONTAINER=$(docker create -it hash /hash.sh) echo "Container $CONTAINER" docker cp hash-input.bin $CONTAINER:/input docker start -a $CONTAINER docker cp ${CONTAINER}:/out/hash.bmp hash_$ID.bmp docker cp ${CONTAINER}:/out/hash.mp4 hash_$ID.mp4 docker stop $CONTAINER && docker rm $CONTAINER
scripts/libhash.sh +6 −1 Original line number Diff line number Diff line Loading @@ -95,8 +95,11 @@ pdebug() { runp5() { hrandom serve -l 5000 "/" >/dev/null 2>&1 & SERVE_PID=$! P5HASH=$HRANDOM firefox -P hash "file:///sketches/$1/$1.html?hash=$P5HASH&width=$WIDTH&height=$HEIGHT" >/dev/null 2>&1 & firefox -P hash "http://localhost:5000/sketches/$1/$1?hash=$P5HASH&width=$WIDTH&height=$HEIGHT" >/dev/null 2>&1 & FIREFOX_PID=$! Loading @@ -108,6 +111,7 @@ runp5() { sleep 1; done kill $FIREFOX_PID kill $SERVE_PID } runpde() { Loading Loading @@ -180,5 +184,6 @@ runrecursive() { else LAYOUT_DEPTH=$(($LAYOUT_DEPTH - 1)) runlayout LAYOUT_DEPTH=$(($LAYOUT_DEPTH + 1)) fi }