This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
################################################################################################### | |
# This is a very simple .bashrc file that I'm using on a daily basis. # | |
# It completely replaced my zsh setup, and should be relatively simple to understand and modify. # | |
# # | |
# Built by Moritz (mo-mar.de) - just do whatever you want with it, according to the Unlicense: # | |
# https://choosealicense.com/licenses/unlicense/ # | |
# # | |
# Simple installation: # | |
# wget https://go.momar.de/bashrc -O ~/.bashrc # | |
################################################################################################### |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# matrix-monitor.sh: a simple shell script to monitor service availability and report to a Matrix channel. | |
# Requirements: | |
# - matrix-commander (set up with --login to the room that should be used) | |
# - curl | |
# Usage: check my-service "$(curl my-service.example.org)" "<h1>Hello World</h1>" "My service unexpectedly doesn't say hello to the world." | |
TRIES=3 | |
CHECK_ONLINE=1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PS1_usercolor=$([ $(id -u) -eq 0 ] && echo "31" || echo "34") | |
PS1=$(printf '\e[0;1m[\e[1;'$PS1_usercolor'm\\u\e[0;1m@\\h \e[1;33m\\w\e[0;1m]\\$\e[0m ') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
A modern look for the nginx fancyindex module (https://github.com/aperezdc/ngx-fancyindex) | |
[[ SCREENSHOT ]] | |
https://static.mo-mar.de/fancyindex-screenshot.jpg | |
[[ USAGE ]] | |
fancyindex on; | |
fancyindex_exact_size off; | |
fancyindex_css_href https://cdn.rawgit.com/moqmar/6c45c469cc7e8294f6cf1bcef9802331/raw/fancyindex.css; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# OpenWRT custom Dynamic DNS script for the hosting.de API. | |
# Set the password to your API key and the domain to the full FQDN of the DNS entry you want to change. | |
# TODO: try different zone names - currently only the root domain can be used. | |
HOSTINGDE_ENDPOINT=https://secure.hosting.de | |
HOSTINGDE_APIKEY="$password" | |
DOMAIN="$__VALUE" | |
RECORD_TYPE=A | |
if [ "$use_ipv6" = "1" ]; then RECORD_TYPE=AAAA; fi | |
TTL=60 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<header class="coverr"><!-- The box you want the video as a background for: just add the "coverr" class --> | |
<div class="coverr-video"> | |
<img src="[JPEG URL]" alt=""> | |
<video autoplay loop> | |
<source src="[MP4 URL]" type="video/mp4"> | |
<source src="[WEBM URL]" type="video/webm"> | |
<!-- Non-HTML5 browsers will just show the image, no need for a fallback text --> | |
</video> | |
</div> | |
<!-- The box content --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class QuickAndDirtyLDAP extends WireData implements Module, ConfigurableModule | |
{ | |
// TODO: make those settings modifiable from the admin interface | |
private $LDAPServer = "ldaps://example.org:636"; | |
private $LDAPBindUser = "cn=readonly,dc=example,dc=org"; | |
private $LDAPBindPassword = "blubb"; | |
private $LDAPSearchScope = "ou=users,dc=example,dc=org"; | |
private $LDAPSearchFilter = "(|(uid=%u)(mail=%u))"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
repo=sharkdb/fd | |
file=0 # use the first file | |
# with jq (recommended if available) | |
wget https://api.github.com/repos/${repo}/releases/latest -qO- | jq -r ".assets[${file}].browser_download_url" | |
# - or - | |
curl https://api.github.com/repos/${repo}/releases/latest -so- | jq -r ".assets[${file}].browser_download_url" | |
file=$(($file + 1)) # WARNING: sed uses 1-based indices! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"ignition": { | |
"version": "2.0.0", | |
"config": {} | |
}, | |
"storage": { | |
}, | |
"systemd": {}, | |
"networkd": {}, | |
"passwd": { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import vue from "rollup-plugin-vue"; | |
import postcss from "rollup-plugin-postcss"; | |
import html2 from "rollup-plugin-html2"; | |
import replace from "@rollup/plugin-replace"; | |
import auto from "@rollup/plugin-auto-install"; | |
import resolve from "@rollup/plugin-node-resolve"; | |
import copy from "rollup-plugin-copy"; | |
// yarn add --dev @rollup/plugin-auto-install @rollup/plugin-html @rollup/plugin-node-resolve @rollup/plugin-replace postcss rollup rollup-plugin-copy rollup-plugin-html2 rollup-plugin-postcss rollup-plugin-vue vue-template-compiler |
NewerOlder