jmjl / gist:bfe8b1b64d0b416a9977015ed67561d9
0 likes
0 forks
3 files
Last active
1 | #!/bin/bash |
2 | # Configurable variables |
3 | PATH=/bin:/usr/bin:/usr/local/bin |
4 | DOC_ROOT=~/temp/www |
5 | DEF_HTML=index.html |
6 | DEF_DIR=www |
7 | LOG_FACILITY=local1 |
8 | # End of configurables |
9 | HTTP_VERSION="HTTP/1.0" |
10 | SERVER="bash-httpd/0.04" |
jmjl / gist:49a614ceabe74be0971478a86c5ae7fb
0 likes
0 forks
1 files
Last active
1 | #!/bin/sh |
2 | # mpdsrvp |
3 | # |
4 | # Serve a MPD instance on a different port already in a partition |
5 | # This "adds" partition support for mpd clients that don't support it. |
6 | # |
7 | # ~jmjl |
8 | : "${mpd_srv_addr:="127.0.0.1"}" |
9 | : "${mpd_srv_port:="6600"}" |
jmjl / gist:374a2fc9703f4c888555fde75e69605e
0 likes
0 forks
1 files
Last active
1 | #!/bin/sh |
2 | # Assuming you want to make a random private /120 prefix in IP and have all of |
3 | # those addresses assigned to the loopback interface (dev lo), and you're root, |
4 | # and have https://gitlab.com/ipcalc/ipcalc installed, and aren't in a network |
5 | # namespace other than global, run: |
6 | # |
7 | # If you also want to be able to bind to those IP addresses, run the following command: |
8 | # sysctl -w net.ipv6.ip_nonlocal_bind = 1 |
9 | # |
10 | # |
jmjl / gist:2b3a2285602f4aacb70e912b61519920
0 likes
0 forks
2 files
Last active
I DON'T THINK THIS SATISFIES THE https://validator.w3.org/feed/docs/atom.html#sampleFeed spec Modify hugo's default RSS feed to make the post's content shown be the post's full content and not only a short snippet of it. To be placed as layouts/index.xml (or renamed to whatever the feed name would be )
1 | From <https://github.com/ttys3/hugo-theme-terminal/blob/86c8d80e396b82f28927b659e0e0edd9d8959afe/layouts/_default/home.rss.xml> |
2 | |
3 | You should probably use this instead. |
4 | |
5 | <EOF |
6 | {{- $pctx := . -}} |
7 | {{- if .IsHome -}}{{ $pctx = .Site }}{{- end -}} |
8 | {{- $pages := slice -}} |
9 | {{- if or $.IsHome $.IsSection -}} |
10 | {{- $pages = $pctx.RegularPages -}} |
jmjl / gist:aea99b3445194b04b992fe4c5b6800d7
0 likes
0 forks
1 files
Last active
Based on KeyCloak's Design Document
$ curl -s "https://id.tilde.green/realms/tgci/.well-known/openid-configuration" |jq '.'
{
"issuer": "https://id.tilde.green/realms/tgci",
jmjl / Makefile targets
0 likes
0 forks
1 files
Last active
Makefile that shows targets names automatically, (I don't remember the source, if you know the source or are the source please contact me)
1 | help: |
2 | @echo "targets:" |
3 | @grep -E '^[a-zA-Z0-9_-]+:.*?## .*$$' $(MAKEFILE_LIST) \ |
4 | | sed -n 's/^\(.*\): \(.*\)##\(.*\)/ \1|\3/p' \ |
5 | | column -t -s '|' |
6 | |
7 | .PHONY: clean |
8 | clean: ## clean the uneeded files |
9 | code_to_clean_the_files |
jmjl / gist:bd3f44ca89994dd295228476445163e9
0 likes
0 forks
1 files
Last active
Broken piece of code to learn C++
1 | #include <cstdio> |
2 | #include <sstream> |
3 | |
4 | void user_write(const char *string) { |
5 | const char* nice_string; |
6 | //std::ostringstream nice_string; |
7 | nice_string << string; |
8 | nice_string << "\r\n"; |
9 | //printf(string + "\r\n"); |
10 | printf(nice_string); |
jmjl / Usbguard Rofi Script
0 likes
0 forks
1 files
Last active
Usbguard rofi script so that I can manage usbguard from a UI instead of manually typing the usbguard commands into the keyboard
1 | #!/bin/sh |
2 | # Copyright Julián Marcos — EPLv2 |
3 | # Texts |
4 | |
5 | RELIST_ACT="*AA: Listar de nuevo. (Re-chequea los estados)" |
6 | EXIT_ACT="*AB: Salir" |
7 | FILTER_ACT="*AC: Filtrar" |
8 | |
9 | BLOCK_ACT="Bloquear" |
10 | REJECT_ACT="Quitar" |
Newer
Older