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
<!doctype html> | |
<html> | |
<head> | |
<style> | |
* { box-sizing: border-box; } | |
body { margin: 0; padding: 0; display: flex; background: #2C2C39; min-height: 100vh; } | |
.input { width: 40%; padding: 25px; display: flex; flex-direction: column; } | |
textarea { flex-grow: 1; border: none; resize: none; margin-bottom: 25px; padding: 15px; background: rgba(255,255,255,0.1); color: #fff; } | |
textarea:last-child { margin-bottom: 0; } | |
.output { flex-grow: 1; padding: 25px 25px 25px 0; } |
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
// 1. Go to https://open.spotify.com/collection/tracks | |
// 2. Scroll to the very bottom so everything is loaded | |
// 3. Press F12 and paste the following code (obviously only if you understand what it does) | |
// 4. Press Ctrl+A and copy everything to a .csv file | |
document.documentElement.innerHTML = "<pre>Title\tArtist\tAlbum\n" | |
+ [...document.querySelectorAll(".tracklist .tracklist-row")] | |
.map(x => { | |
const e = x.querySelector(".TrackListRow__explicit-label"); | |
if (e) e.parentElement.removeChild(e); | |
return x.querySelector(".tracklist-name").textContent + "\t" + |
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 | |
set -eu | |
IFS=$'\n\t' | |
# Bash script to apply a text file with a list of packages to add (package) and remove (!package) to an Arch-based | |
# system using yay. Written to keep two computers in sync, but can be used for a lot of purposes. | |
# The packages can be separated using spaces or newlines; line comments starting with # are supported, too. | |
# The packages file can be defined as a command line argument. | |
# Otherwise, it'll be taken from $XDG_PUBLICSHARE_DIR/packages. |
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 | |
# Setup Packages | |
pacman -S yay | |
mkdir -p ~/.local/bin | |
wget https://gist.githubusercontent.com/moqmar/450ac6592028c742177bae71705e6e16/raw/autoyay -O ~/.local/bin/autoyay | |
chmod +x ~/.local/bin/autoyay | |
autoyay | |
# Setup Syncthing |
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
# Build the ubilinux kernel for the UP Boards. The script is built to be used with Docker. | |
# More information: https://wiki.up-community.org/Compile_ubilinux_kernel_from_source | |
# Usage: docker run -it --rm debian:9 sh -c 'wget ... && sh up-kernel-build.sh' | |
apt-get update | |
apt-get install -y git build-essential libncurses5-dev libssl-dev gcc g++ bc | |
git clone https://github.com/emutex/ubilinux-kernel.git -b upboard-4.9 linux-upboard | |
cd linux-upboard | |
make upboard_defconfig |
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
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 |
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
<?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))"; |