Define the GIST url and pipe some script to bash/sh
GIST=https://gist.githubusercontent.com/marcbachmann/16574ba8c614bb3b78614a351f324b86/raw/a7e17acc57938a047c093f560858e3b0a8e2c741
curl -s $GIST/script-name | bash
module.exports = { | |
config: { | |
// default font size in pixels for all tabs | |
fontSize: 12.5, | |
// font family with optional fallbacks | |
fontFamily: '"Meslo LG S for Powerline", Menlo, "DejaVu Sans Mono", "Lucida Console", monospace', | |
// terminal cursor background color (hex) | |
cursorColor: 'rgba(255,255,255,.4)', |
[SERVICE] | |
Flush 5 | |
Daemon Off | |
Log_Level info | |
Parsers_File /etc/fluent-bit/parsers.conf | |
[INPUT] | |
Name Tail | |
Path /mnt/data/docker/containers/*/*.log | |
Path_Key file |
const OriginalDate = global.Date | |
function restoreFakeDate () { | |
global.Date = OriginalDate | |
} | |
function useFakeDate (date) { | |
date = new OriginalDate(date) | |
class Date extends OriginalDate { | |
constructor (...args) { |
-- ISC LICENSE | |
-- | |
-- Copyright (c) 2021, Marc Bachmann <marc@livingdocs.io> | |
-- Permission to use, copy, modify, and/or distribute this software for any | |
-- purpose with or without fee is hereby granted, provided that the above | |
-- copyright notice and this permission notice appear in all copies. | |
-- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | |
-- WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF |
-- zaddhset sortedsetkey score hsetkey fieldname fieldvalue [fieldname fieldvalue ...] | |
-- sortedsetkey = KEYS[1] | |
-- score = KEYS[2] | |
-- hsetkey = KEYS[3] | |
-- fields = ARGV | |
if #KEYS ~= 3 or #ARGV < 2 or #ARGV % 2 ~= 0 then | |
return {err="ERR wrong number of arguments for 'zaddhset' command"} | |
end | |
if redis.call('EXISTS', KEYS[3]) == 1 then return nil end |
#!/bin/bash | |
set -e | |
USERNAME=$1 | |
if ! grep -qE '^[a-zA-Z0-9.@\-\+_]{2,100}$' <<< "$USERNAME"; then | |
1>&2 echo -e "❌ Username is missing or contains invalid characters | |
Usage: ./kubernetes-create-user.sh marc@livingdocs.io | |
Will create a certificate using subject '/CN=marc@livingdocs.io' | |
and write the credentials into the 'marc@livingdocs.io.kubeconfig' file." |
const response = await fetch(`http://localhost:8080/stream`, { | |
method: 'get', | |
headers: { | |
Authorization: `Bearer SomeToken` | |
} | |
}) | |
for await (const value of ndJsonIterator(response.body)) { | |
console.log(value) | |
} |
{ "log-driver": "journald", "log-opts": {"tag": "{{.Name}}/{{.ID}}"}} |
tell application "System Preferences" to activate | |
tell application "System Events" | |
get properties | |
tell application "System Preferences" | |
reveal anchor "output" of pane id "com.apple.preference.sound" | |
end tell | |
tell process "System Preferences" | |
set theRows to every row of table 1 of scroll area 1 of ¬ | |
tab group 1 of window "sound" | |
repeat with aRow in theRows |