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
#!/usr/bin/env bash | |
# Copyright (c) 2017 Brian 'redbeard' Harrington <[email protected]> | |
# | |
# dumpcerts.sh - A simple utility to explode a Traefik acme.json file into a | |
# directory of certificates and a private key | |
# | |
# Usage - dumpcerts.sh /etc/traefik/acme.json /etc/ssl/ | |
# | |
# Dependencies - | |
# util-linux |
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
# Update CHANGELOG.md with latest release | |
update-changelog: | |
echo -e "# Changelog\n" >> temp.md | |
rel=$$(gh release list | head -n 1 | awk '{print $$1}'); \ | |
echo "## $$rel" >> temp.md; \ | |
echo "" >> temp.md; \ | |
gh release view --json body $$rel | \ | |
jq --raw-output '.body' | \ | |
grep -v '^## Changelog' | \ | |
sed -e 's/^#/##/g' >> temp.md |
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 {EditorState, EditorView, basicSetup} from "@codemirror/basic-setup" | |
import {javascript} from "@codemirror/lang-javascript" | |
const jscode=` | |
// Note: | |
// 1. Use React.something instead of importing something | |
// 2. Container id is 'app' | |
function Counter({initialCount}) { |
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
#!/usr/bin/env ruby | |
# bi | |
# Quickly fetch and display info for the given homebrew formula or cask | |
# | |
# perf: | |
# brew info nginx -> 0m1.742s | |
# bi nginx -> 0m0.166s | |
# | |
# Works well with fzf (via brew.fzf) |
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
// write this config file at /var/homelabos/meshcentral/data/config.json | |
{ | |
"$schema": "http://info.meshcentral.com/downloads/meshcentral-config-schema.json", | |
"settings": { | |
"cert": "meshcentral.example.com", | |
"WANonly": true, | |
"_LANonly": true, | |
"_sessionKey": "MyReallySecretPassword1", | |
"port": 80, | |
"_aliasPort": 443, |
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
// Original author fwed ([email protected]) | |
// Modified from | |
// https://gist.github.com/0x4a/e410aa72fca06fcfafce9f00ff47d82c | |
// https://gist.github.com/anonymous/2cca33d376f7f924fdaa67891ad098cc | |
// https://medium.com/@fw3d/auto-archive-emails-in-gmail-after-2-days-1ebf0e076b1c | |
var OP_ARCHIVE = 1; | |
var OP_READ = 2; | |
var OP_DELETE = 4; |
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/bash | |
# convert.sh | |
# util for generating resized images at multiple common display resolutions | |
SIZES="720 750 1080 1100 1440 1680 2880" | |
EXTS="jpg JPG jpeg JPEG" | |
print_res() { |
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
# lib/tasks/db.rake | |
# Original source: https://gist.github.com/hopsoft/56ba6f55fe48ad7f8b90 | |
# Merged with: https://gist.github.com/kofronpi/37130f5ed670465b1fe2d170f754f8c6 | |
# | |
# This is the code from the comment: | |
# https://gist.github.com/hopsoft/56ba6f55fe48ad7f8b90#gistcomment-2275324 | |
# Made into a fork/separate gist for easier download, with redundant shell-script removed. | |
# | |
# | |
# Usage: |
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
# | |
# Sample configuration file for the CUPS scheduler. See "man cupsd.conf" for a | |
# complete description of this file. | |
# | |
# Log general information in error_log - change "warn" to "debug" | |
# for troubleshooting... | |
LogLevel warn | |
# Deactivate CUPS' internal logrotating, as we provide a better one, especially |
NewerOlder