Compare commits
No commits in common. "eeade3cdfbc08b935f6da08817a005076a1ccd09" and "808ef3bb71d96f79c7f67529ed90506f09aa0e0c" have entirely different histories.
eeade3cdfb
...
808ef3bb71
44
Makefile
44
Makefile
@ -1,44 +0,0 @@
|
|||||||
help: ## Print the help message
|
|
||||||
@awk 'BEGIN {FS = ":.*?## "} /^[0-9a-zA-Z._-]+:.*?## / {printf "\033[36m%s\033[0m : %s\n", $$1, $$2}' $(MAKEFILE_LIST) | \
|
|
||||||
sort | \
|
|
||||||
column -s ':' -t
|
|
||||||
|
|
||||||
articles != find * -type f -name "*.md"
|
|
||||||
|
|
||||||
db.rec: $(articles)
|
|
||||||
for x in $^ ; do \
|
|
||||||
sed -n '2,/^---$$/ {/^---$$/d; p}' "$$x" |\
|
|
||||||
sed -e 's/\[ //' -e 's/ \]//' |\
|
|
||||||
tr -d '"' ;\
|
|
||||||
printf "file: %s\n\n" "$$x" ;\
|
|
||||||
done > $@
|
|
||||||
recsel $@ -e "requires != ''" -CR title,requires |\
|
|
||||||
while read title requires; do \
|
|
||||||
IFS=', ' && for provider in $$requires; do \
|
|
||||||
recset $@ -e "title = '$${provider}'" -f provides -a "$${title}" ;\
|
|
||||||
done ;\
|
|
||||||
done
|
|
||||||
|
|
||||||
default += db.rec
|
|
||||||
|
|
||||||
.git/info/exclude: $(default)
|
|
||||||
echo $^ | tr ' ' '\n' > $@
|
|
||||||
|
|
||||||
default += .git/info/exclude
|
|
||||||
|
|
||||||
.PHONY: database
|
|
||||||
database: $(default) ## Make a database for recfiles
|
|
||||||
|
|
||||||
.PHONY: article
|
|
||||||
article: ## Write an article
|
|
||||||
@path=$$(find . -type d -printf '%P\n' | fzy); \
|
|
||||||
read -p "Title: " title; \
|
|
||||||
printf '%s\n' '---' >> $$path/$$title.md ; \
|
|
||||||
printf 'title: "%s"\n' "$$title" >> $$path/$$title.md ; \
|
|
||||||
printf 'tags: [ "%s" ]\n' "$$path" | sed 's#\/#", "#g' >> $$path/$$title.md ; \
|
|
||||||
printf '%s\n\n' '---' >> $$path/$$title.md ;\
|
|
||||||
$(EDITOR) +5 $$path/$$title.md
|
|
||||||
|
|
||||||
.PHONY: clean
|
|
||||||
clean: ## Remove all generated files
|
|
||||||
$(RM) $(default)
|
|
@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
title: "Board Games"
|
title: "Board Games"
|
||||||
tags: [ "data", "recfiles", "games" ]
|
tags: [ "data", "recfiles" ]
|
||||||
---
|
---
|
||||||
|
|
||||||
You can play with a board games database from boardgamegeek.com.
|
You can play with a board games database from boardgamegeek.com.
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
title: "Soft Serve through https"
|
title: "Soft Serve through https"
|
||||||
tags: [ "data", "git", "lfs" ]
|
tags: [ "data", "git" ]
|
||||||
---
|
---
|
||||||
|
|
||||||
## `http` Setup
|
## `http` Setup
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
---
|
---
|
||||||
title: "basic-install"
|
title: "basic-install"
|
||||||
tags: [ "Documentation", "arch" ]
|
tags: [ "Documentation", "arch" ]
|
||||||
requires: [ "partitions", "time" ]
|
|
||||||
---
|
---
|
||||||
Keyboard layout changed.
|
Keyboard layout changed.
|
||||||
|
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
---
|
---
|
||||||
title: "fail2ban"
|
title: "fail2ban"
|
||||||
tags: [ "Documentation", "Networking" ]
|
tags: [ "Documentation", "Networking" ]
|
||||||
requires: [ "ssh" ]
|
|
||||||
---
|
---
|
||||||
# SSH Daemon Jail
|
# SSH Daemon Jail
|
||||||
|
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
---
|
---
|
||||||
title: "sshfs"
|
title: "sshfs"
|
||||||
tags: [ "Documentation", "Networking" ]
|
tags: [ "Documentation", "Networking" ]
|
||||||
requires: [ "ssh" ]
|
|
||||||
---
|
---
|
||||||
# Mount
|
# Mount
|
||||||
|
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
---
|
---
|
||||||
title: "ssh-tricks"
|
title: "ssh tricks"
|
||||||
tags: [ "Documentation", "Networking", "ssh", "tricks" ]
|
tags: [ "Documentation", "Networking", "ssh", "tricks" ]
|
||||||
requires: [ "ssh" ]
|
|
||||||
---
|
---
|
||||||
|
|
||||||
Mount a remote filesystem locally with fuse-sshfs:
|
Mount a remote filesystem locally with fuse-sshfs:
|
||||||
|
27
new.sh
Executable file
27
new.sh
Executable file
@ -0,0 +1,27 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
echo Select a category
|
||||||
|
|
||||||
|
category="$(find . -type d -printf '%P\n' | fzy)"
|
||||||
|
|
||||||
|
[ ! -d "$category" ] && mkdir "$category"
|
||||||
|
|
||||||
|
echo Select a name
|
||||||
|
|
||||||
|
read name
|
||||||
|
|
||||||
|
filePath="$category/$(echo $name | sed 's/ /_/g').md"
|
||||||
|
|
||||||
|
tagsList="$(echo \"$category | sed 's#\/#", "#g')\""
|
||||||
|
|
||||||
|
[ -e "$filePath" ] && $EDITOR "$filePath" && exit 0
|
||||||
|
|
||||||
|
echo "---
|
||||||
|
title: \"$name\"
|
||||||
|
tags: [ $tagsList ]
|
||||||
|
---
|
||||||
|
|
||||||
|
" > "$filePath"
|
||||||
|
|
||||||
|
$EDITOR "$filePath"
|
||||||
|
|
@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
title: "android"
|
title: "android"
|
||||||
tags: [ "Documentation", "System", "phone" ]
|
tags: [ "Documentation", "System" ]
|
||||||
---
|
---
|
||||||
# mtpfs
|
# mtpfs
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user