Here be dragons. Use with extreme caution.
This script is designed to accept namespaces as a list of arguments and will perform a namespace child resource delete loop before terminating the namespace and any finalizers.
cat > /etc/yum.repos.d/CentOS-Stream-AppStream.repo << EOF | |
# CentOS-Stream-AppStream.repo | |
# | |
# The mirrorlist system uses the connecting IP address of the client and the | |
# update status of each mirror to pick current mirrors that are geographically | |
# close to the client. You should use this for CentOS updates unless you are | |
# manually picking other mirrors. | |
# | |
# If the mirrorlist does not work for you, you can try the commented out | |
# baseurl line instead. |
To start, read the official release notes.
If your install fits into "vanilla Debian plus maybe a handful of 3rd-party repos", then this guide for a simple upgrade to Debian 12 "bookworm" from Debian 11 "bullseye" can be helpful. 3rd-party repos are handled with a find command.
Note upgrade is only supported from Debian 11 to Debian 12. If you are on Debian 10, upgrade to Debian 11 first and make sure to change the security repo as per the release notes. Then once on Debian 11, you can upgrade to Debian 12.
target: | |
SELECTED=`cat main.tf | grep resource | tr -d '"' | awk '{ print $$2 "." $$3 }' | fzf` ; \ | |
terraform apply -target=$$SELECTED |
I had an interesting use-case with a customer for which I provide consulting services: they needed multiple fields to be marked as "optional".
We will take a CRUD-ish example, for the sake of simplicity.
For example, in the following scenario, does a null
$description
mean "remove the description",
using OpenTelemetry; | |
using OpenTelemetry.Logs; | |
using OpenTelemetry.Resources; | |
using OpenTelemetry.Trace; | |
var builder = WebApplication.CreateBuilder(args); | |
var app = builder.Build(); | |
var appResourceBuilder = ResourceBuilder.CreateDefault() | |
.AddService(serviceName: Telemetry.ServiceName, serviceVersion: Telemetry.ServiceVersion); |
# The general procedure here is adapted from the 7->8 guide here. https://www.tecmint.com/upgrade-centos-7-to-centos-8/ | |
# | |
# It is a curated list of my bash history. I entered other commands so hopefully I got the right ones here. | |
yum upgrade | |
reboot | |
dnf install epel-release | |
dnf install rpmconf | |
dnf install yum-utils | |
rpmconf -a # answer "n" to both things |
import json | |
import os | |
import certifi | |
import requests | |
from authlib.oauth2.rfc6749 import OAuth2Token | |
from flask import Flask, url_for, session | |
from flask import render_template, redirect | |
from authlib.integrations.flask_client import OAuth, token_update |
# KEYCLOAK BASE URL | |
KEYCLOAK_BASE_URL= | |
# KEYCLOAK CLIENT SECRET | |
KEYCLOAK_CLIENT_SECRET= | |
# KEYCLOAK CLIENT ID | |
KEYCLOAK_CLIENT_ID= | |
# BASE URL FOR NEXT AUTH |
<?php | |
/** | |
* Imagine this is an API call | |
*/ | |
function listPage(int $i): array | |
{ | |
$next = $i >= 9 ? null : $i + 1; | |
return ['cursor' => $next, 'items' => array_fill(0, 5, $i)]; | |
} |