Skip to content

Instantly share code, notes, and snippets.

View karstengresch's full-sized avatar
:octocat:
.

Karsten Gresch karstengresch

:octocat:
.
View GitHub Profile
@karstengresch
karstengresch / index.js
Created September 6, 2023 09:30 — forked from vralle/index.js
Use post meta in gutenberg
// https://make.wordpress.org/core/2020/03/02/general-block-editor-api-updates/
// https://github.com/WordPress/gutenberg/tree/trunk/packages/core-data
import {
PanelRow, TextControl,
} from '@wordpress/components';
import { useSelect } from '@wordpress/data';
import { useEntityProp } from '@wordpress/core-data';
import { PluginDocumentSettingPanel } from '@wordpress/edit-post';
import { registerPlugin } from '@wordpress/plugins';
<?php
/**
* Plugin Name: [Forminator] Skip Steps in Pagination Form
* Plugin URI: https://premium.wpmudev.org
* Description: With this snippet and some extra configurations in your form is possible to skip steps according to user-selected choices in a control field - works with checkboxes, radio buttons and selects.
* Author: Glauber Silva @ WPMUDEV
* Author URI: https://premium.wpmudev.org
* Jira Task: FOR-428 and SLS-263 and SLS-2035
* License: GPLv2 or later
*
@karstengresch
karstengresch / Highlight CPT Archive and wp_nav_menu parents
Created May 23, 2023 17:15 — forked from VlooMan/Highlight CPT Archive and wp_nav_menu parents
Highlight the CPT (Custom Post Type) Archive & its Parents ("current-menu-parent") & its Ancestors ("current-menu-ancestor") in the WordPress Navigation wp_nav_menu() when viewing the Archive itself or a single detail page of the CPT. Let's say you have CPT called "projects" and you have a WordPress menu set as "My Work (link to a page) > Projec…
/**
* Gist Name: Highlight CPT Archive and wp_nav_menu parents
* Author: VlooMan
* Author URI: http://ishyoboy.com
*
* Highlight the CPT (Custom Post Type) Archive & its Parents ("current-menu-parent")
* & its Ancestors ("current-menu-ancestor") in the WordPress Navigation wp_nav_menu() when viewing the Archive itself
* or a single detail page of the CPT.
*
* Let's say you have CPT called "projects" and you have a WordPress menu set as
@karstengresch
karstengresch / extensions.list
Created March 13, 2023 02:05
My VSC extensions as of 2023-03-13
a5hk.night-coder
alefragnani.Bookmarks
alefragnani.project-manager
arcticicestudio.nord-visual-studio-code
barjo.anirak
bceskavich.theme-dracula-at-night
bmewburn.vscode-intelephense-client
CarloCardella.hogwarts-colors-dark
Claudius.classic-terminal
contextmapper.context-mapper-vscode-extension
@karstengresch
karstengresch / keybindings.json
Created March 13, 2023 00:04
My keybindings.json as of 2023-03-13
/* KG's KBS */
[
{
"key": "shift shift",
"command": "workbench.action.showCommands"
},
{
"key": "shift+cmd+t",
"command": "workbench.action.terminal.focus"
},
@karstengresch
karstengresch / settings.json
Created March 13, 2023 00:00
My settings.json as of 2023-03-13
{
/* GENERAL/WORKBENCH*/
"update.mode": "manual",
"workbench.colorTheme": "Mayukai Sunset",
"workbench.editor.enablePreview": false,
"workbench.editor.untitled.hint": "hidden",
"workbench.fontAliasing": "auto",
"workbench.iconTheme": "vscode-icons",
"workbench.settings.editor": "json",
"workbench.settings.useSplitJSON": true,
@karstengresch
karstengresch / keybindings.json
Created October 19, 2022 10:21 — forked from kevinslin/keybindings.json
Kevin's VSCode Keybindings
// Place your key bindings in this file to override the defaults
[
// The following are Kevin's keybindings for VSCode
// They are made available under CC BY 4.0
//
// To navigate
// `==` denote sections
// `---` denotes subsections
//
// == Dendron
@karstengresch
karstengresch / DisableBigSur.sh
Created May 30, 2022 06:45 — forked from b0gdanw/DisableBigSur.sh
Disable Big Sur services
#!/bin/zsh
#Credit: Original idea and script disable.sh by pwnsdx https://gist.github.com/pwnsdx/d87b034c4c0210b988040ad2f85a68d3
#Disabling unwanted services on macOS 11 Big Sur (11) and macOS Monterey (12)
#Disabling SIP is required ("csrutil disable" from Terminal in Recovery)
#Modifications are written in /private/var/db/com.apple.xpc.launchd/ disabled.plist, disabled.501.plist & disabled.205.plist
# user
TODISABLE=()
@karstengresch
karstengresch / red_hat_sso.sh
Last active May 2, 2022 08:37
Red Hat SSO Installation on OpenShift
#!/bin/bash -
# globals
# name of the OCP project - all lowercase, only hyphens, no underscore etc.
SSO_PROJECTNAME="redhat-sso"
FILE_KEYSTORE_JKS="keystore.jks"
FILE_KEYSTORE_JGROUPS="jgroups.jceks"
PASSWORD_KEYSTORE_JKS="password123"
PASSWORD_KEYSTORE_JGROUPS="password123"
STOREPASS_KEYSTORE_JKS="password123"
STOREPASS_KEYSTORE_JGROUPS="password123"
@karstengresch
karstengresch / Podman-on-MacOS.md
Created December 20, 2019 15:14 — forked from rbo/Podman-on-MacOS.md
Podman on Mac OS
$ export PATH=$(pwd):$PATH
$ podman-machine create box
Podman machine "box" already exists
$ podman-machine start box
Starting "box"...