Skip to content

Instantly share code, notes, and snippets.

View fredrikln's full-sized avatar

Fredrik Larsson fredrikln

View GitHub Profile
variables() {
NSAPP=$(echo ${APP,,} | tr -d ' ') # This function sets the NSAPP variable by converting the value of the APP variable to lowercase and removing any spaces.
var_install="${NSAPP}-install" # sets the var_install variable by appending "-install" to the value of NSAPP.
INTEGER='^[0-9]+([.][0-9]+)?$' # it defines the INTEGER regular expression pattern.
}
# This function sets various color variables using ANSI escape codes for formatting text in the terminal.
color() {
YW=$(echo "\033[33m")
BL=$(echo "\033[36m")
@fredrikln
fredrikln / otel-local-config.yml
Created August 15, 2024 08:31
Open Telemetry Collector container with debug logging
receivers:
otlp:
protocols:
grpc:
http:
processors:
batch:
exporters:

Keybase proof

I hereby claim:

  • I am fredrikln on github.
  • I am fredrikln (https://keybase.io/fredrikln) on keybase.
  • I have a public key ASCDy1bAsBXJdfeJcAH8gUlTpG2dzxLJWrRud_mm_UdaBwo

To claim this, I am signing this object:

@fredrikln
fredrikln / functions.php
Created February 2, 2017 14:23
Change Yoast SEO og:type to video and add og:video meta tag for custom post type
// ...snip
// Change Yoast og:type and add og:video meta tags for a custom post type in WordPress
// Note: This assumes you are using a custom field named 'youtube_id' using Advanced Custom Fields plugin
// Change og:type of episodes and videos to video
function yoast_change_opengraph_type( $type ) {
// If this is the wanted custom post type
if ( get_post_type() == 'episode' ) {
return 'video';
@fredrikln
fredrikln / config.yml
Last active July 26, 2020 07:11
Flexget config
templates:
# Transmission config
transmission:
transmission:
host: 'localhost'
port: 9091
username: [censored]
password: [censored]
ratio: -1.0
addpaused: No