Skip to content

Instantly share code, notes, and snippets.

View ThomasSchoenbeck's full-sized avatar

Thomas Schönbeck ThomasSchoenbeck

  • Germany
  • 10:22 (UTC +02:00)
View GitHub Profile
@ThomasSchoenbeck
ThomasSchoenbeck / gist:cac93bb3796a85815a761632d50ddbea
Last active January 17, 2022 19:52
windows git alias (C:\WINDOWS\system32\cmd.exe /K C:\windows_aliases\aliases.cmd)
# copied from https://github.com/patomation/windows_aliases
@echo off
:: Clear
doskey clear=cls
:: doskey ls=dir
doskey ll=dir
# direct download
curl -LO "https://dl.k8s.io/release/v1.23.0/bin/windows/amd64/kubectl.exe"
# linux command
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/windows/amd64/kubectl.exe" -o c:\tools\kubectl.exe
# windows cmd command
FOR /F "tokens=* USEBACKQ" %g IN (`curl -L -s https://dl.k8s.io/release/stable.txt`) do (SET "k8s-ver=%g") && curl -L "https://dl.k8s.io/release/%k8s-ver%/bin/windows/amd64/kubectl.exe" -o c:\tools\kubectl.exe
export function handleJsonResponse(response: any) {
return response.json()
.then((json: any) => {
if (!response.ok) { // if changed, all API calls will break
const error = Object.assign({}, json, {
data: json,
status: response.status,
statusText: response.statusText,
});
@ThomasSchoenbeck
ThomasSchoenbeck / example_impl.tsx
Last active January 19, 2022 15:42
log with style
import { createPrefixGroup, loggingGroupProps, lws, prefixes } from "../../utilities/logging"
interface extendedLoggingGroupProps extends loggingGroupProps {
pSet: string[]
pFS: string[]
pId: string[]
}
const prefix = ["Test File", "#157A6E"] // basis prefix per file
const p = createPrefixGroup(prefix) as extendedLoggingGroupProps // construct variable with all prefix Groups
apiVersion: v1
kind: Pod
metadata:
name: alpine-volume-test-pod
labels:
app: alpine-volume-test
spec:
containers:
- name: alpine-volume-test-container
image: <image-registry>/alpine:3.13.5
https://github.com/faressoft/terminalizer - terminal recording
https://github.com/raineorshine/npm-check-updates - check packages for updates (ncu -g)
https://github.com/isaacs/rimraf - file and folder deletion
@ThomasSchoenbeck
ThomasSchoenbeck / FloatingOrigin
Created March 25, 2021 23:14 — forked from brihernandez/FloatingOrigin.cs
Floating origin to handle large worlds in Unity.
// Based on the Unity Wiki FloatingOrigin script by Peter Stirling
// URL: http://wiki.unity3d.com/index.php/Floating_Origin
using UnityEngine;
using UnityEngine.SceneManagement;
public class FloatingOrigin : MonoBehaviour
{
[Tooltip("Point of reference from which to check the distance to origin.")]
public Transform ReferenceObject = null;