Introduction
Introduction Statistics Contact Development Disclaimer Help
Add memes hackathon for brcon2023. - brcon2023-hackathons - Bitreichcon 2023 Ha…
git clone git://bitreich.org/brcon2023-hackathons git://enlrupgkhuxnvlhsf6lc3fz…
Log
Files
Refs
Tags
---
commit ab70f21c78e95875b59872ab3e32f874281155cb
Author: Christoph Lohmann <[email protected]>
Date: Wed, 2 Aug 2023 21:45:40 +0200
Add memes hackathon for brcon2023.
Diffstat:
A memes/description.md | 18 ++++++++++++++++++
A memes/dir2meme | 28 ++++++++++++++++++++++++++++
A memes/dir2memeblob | 33 +++++++++++++++++++++++++++++…
A memes/dirrename2meme | 36 +++++++++++++++++++++++++++++…
A memes/meme-classify | 24 ++++++++++++++++++++++++
A randomness/description.md | 57 +++++++++++++++++++++++++++++…
6 files changed, 196 insertions(+), 0 deletions(-)
---
diff --git a/memes/description.md b/memes/description.md
@@ -0,0 +1,18 @@
+# Memes Hackathon
+
+## Goal
+
+We want to improve on meme tools.
+
+## Barebones
+
+Some tools have already been added to the repository, which help in
+easily classifying memes and helping you keep your daily meme collection
+easy.
+
+What is missing, is the export of meme zip files, which can then be
+easily imported into a meme repository, like with annna.
+
+
+Have fun!
+
diff --git a/memes/dir2meme b/memes/dir2meme
@@ -0,0 +1,28 @@
+#!/bin/bash
+
+if [ $# -lt 1 ];
+then
+ printf "usage: %s file.meme\n" "$(basename "$0")" >&2
+ exit 1
+fi
+
+memefile="$1"
+outname="${memefile%.*}"
+
+printf "meme\n" > ${memefile}
+find . -type f \
+| while read -r medianame;
+do
+ case "${medianame}" in
+ *.meme|*.memeblob.*)
+ continue
+ ;;
+ esac
+
+ filename="$(basename "${medianame}")"
+ memetag="${filename%.*}"
+ printf "#%s %s\n" "${memetag}" "${filename}" >> "${memefile}"
+done
+
+printf "%s\n" "${memefile}"
+
diff --git a/memes/dir2memeblob b/memes/dir2memeblob
@@ -0,0 +1,33 @@
+#!/bin/bash
+
+if [ $# -lt 1 ];
+then
+ printf "usage: %s file.meme\n" "$(basename "$0")" >&2
+ exit 1
+fi
+
+memefile="$1"
+outname="${memefile%.*}"
+outzip="${outname}.meme.blob.zip"
+
+[ ! -e "${memefile}" ] && printf "meme\n" > ${memefile}
+find . -type f \
+| while read -r medianame;
+do
+ case "${medianame}" in
+ *.meme|*.memeblob.*)
+ continue
+ ;;
+ esac
+
+ filename="$(basename "${medianame}")"
+ memetag="${filename%.*}"
+ [ ! -e "${memefile}" ] && printf "#%s %s\n" "${memetag}" "${filename}"…
+ zip -u "${outzip}" "${filename}"
+done
+
+zip -u "${outzip}" "${memefile}"
+rm "${memefile}"
+
+printf "%s\n" "${outzip}"
+
diff --git a/memes/dirrename2meme b/memes/dirrename2meme
@@ -0,0 +1,36 @@
+#!/bin/sh
+
+if [ $# -lt 1 ];
+then
+ printf "usage: %s file.meme\n" "$(basename "$0")" >&2
+ exit 1
+fi
+
+outfile="$1"
+
+printf "meme\n" > ${outfile}
+find . -type f \
+| while read -r medianame;
+do
+ basemedianame="$(basename "${medianame}")"
+ newfilename="$(printf "%s" "${basemedianame}" \
+ | tr -c 'a-zA-Z0-9.-_' '_')"
+ if [ "${basemedianame}" != "${newfilename}" ];
+ then
+ mv "${medianame}" "${newfilename}"
+ printf "%s -> %s\n" "${basemedianame}" "${newfilename}"
+ fi
+ mpv "${newfilename}"
+ printf "%s\n" "${newfilename}"
+ memetag="$(thinglaunch -o -p "memetag> ")"
+ if [ "${memetag}" = "quit" ];
+ then
+ exit 0
+ fi
+
+ if [ -n "${memetag}" ];
+ then
+ printf "#%s %s\n" "${memetag}" "${newfilename}" >> ${outfile}
+ fi
+done
+
diff --git a/memes/meme-classify b/memes/meme-classify
@@ -0,0 +1,24 @@
+#!/bin/sh
+
+set -x
+
+if [ $# -lt 1 ];
+then
+ printf "usage: %s file.ext\n" "$(basename "$0")" >&2
+ exit 1
+fi
+
+inputpath="$1"
+inputfile="$(basename "${inputpath}")"
+filename="${inputfile%.*}"
+memename="$(thinglaunch -o -p "${filename} meme name> ")"
+
+memebase="$HOME/fotos/memes"
+cp $inputpath ${memebase}
+
+cd $memebase
+outputfile="$(quinq-size "${inputfile}" | cut -d' ' -f 3-)"
+outputext="${outputfile#*.}"
+mv ${outputfile} ${outputfile/${filename}_quinqsize/${memename}}
+rm $inputfile
+
diff --git a/randomness/description.md b/randomness/description.md
@@ -0,0 +1,57 @@
+# Random Source Generator
+
+## Goal
+
+Write a simple frontend for gopher for this randomness source. This can
+then be reused everwhere over gopher.
+
+## Principle
+
+On Bitreich there will be a stream of random bits provided by a geiger
+counter and other random sources from 20h's home server. This should be
+shown to gopher in a standard way, as defined here:
+
+ * https://nvlpubs.nist.gov/nistpubs/ir/2019/NIST.IR.8213-draft.pdf
+ * https://beacon.nist.gov/ns/beacon/pulse/2.0/beacon-2.0.xsd
+ * https://beacon.nist.gov/beacon/2.0/pulse/last
+ * https://qrng.anu.edu.au/ as source
+ * https://drand.love/developer/http-api/#public-endpoints
+
+We can monkey-patch
+
+ * https://github.com/nhorman/rng-tools/rngd_nistbeacon.c
+
+to using gophers://.
+
+## Applications
+
+This could be used for
+
+ * https://codeberg.org/rendezvous/reunion/
+ * https://near.org/blog/randomness-threshold-signatures/
+ * https://apps.dtic.mil/sti/pdfs/ADA222698.pdf
+ * https://github.com/GoodiesHQ/noknow-c
+ * https://github.com/gtanzer/zk
+
+## Testing Randomness
+
+ * https://github.com/dyne/libdisorder
+
+## Naming
+
+There is a huge list of possible names for this service:
+
+ * https://de.wikipedia.org/wiki/Tyche
+ * https://de.wikipedia.org/wiki/Fortuna
+ * https://de.wikipedia.org/wiki/Parzen
+ * https://de.wikipedia.org/wiki/Moiren
+ * https://de.wikipedia.org/wiki/Klotho_(Mythologie)
+ * https://de.wikipedia.org/wiki/Lachesis_(Mythologie)
+ * https://de.wikipedia.org/wiki/Atropos
+ * https://de.wikipedia.org/wiki/Morta
+ * https://de.wikipedia.org/wiki/Datei:Kuntze-Konicz_Fortune.jpg
+ * https://de.wikipedia.org/wiki/Datei:ForutuneWheel.jpg
+
+
+Have fun!
+
You are viewing proxied material from bitreich.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.