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';
@hosct
hosct / ctBiosKey.cpp
Last active January 5, 2024 23:03
ctBiosKey
#include <iostream>
#include <Windows.h>
int main()
{
DWORD firmwareTableProviderSignature = 0x41435049; // "ACPI"
DWORD firmwareTableMSDMID = 0x4d44534d; // "MSDM"
UINT structSize = EnumSystemFirmwareTables(firmwareTableProviderSignature, NULL, 0);
if (structSize == 0) {
@afragen
afragen / php.ini.hbs
Last active January 11, 2023 22:29
Stuff for xDebug 3.x and Local
; Add to all lightning services PHP conf files using xDebug 3.x
xdebug.mode=debug
xdebug.client_port=9003
xdebug.start_with_request=trigger
xdebug.discover_client_host=yes
xdebug.idekey=VSCODE
; Add to all lightning services PHP conf files using xDebug 2.x
xdebug.remote_enable=1
xdebug.remote_connect_back=Off
@b0gdanw
b0gdanw / DisableBigSur.sh
Last active March 29, 2024 09:50
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 and disabled.501.plist
# user
TODISABLE=()
@kevinslin
kevinslin / keybindings.json
Last active May 10, 2023 01:32
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
@wpmudev-sls
wpmudev-sls / forminator-skip-steps-in-pagination-form.php
Last active December 9, 2023 17:24
Forminator - Skip Steps in Pagination Form
<?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
*
@rbo
rbo / bassh_rc_snippet.sh
Last active September 23, 2022 19:26
powerline-go
# https://github.com/justjanne/powerline-go
if [ -x "$(command -v powerline-go)" ]; then
function _update_ps1() {
rc=$?
if [ -x "$(command -v powerline-go)" ]; then
PS1="$(powerline-go -error $rc -max-width 80 -newline -colorize-hostname -modules "ssh,host,user,cwd,perms,git,kube,exit" -priority "ssh,host,cwd,exit,git,kube" -modules-right "time" )"
else
PS1="\u@\h:\w $ "
fi
}
@jevakallio
jevakallio / readme.md
Last active April 22, 2024 15:51
`adb pull` from app data directory without root access

TL;DR;

com.package.name is your app identifier, and the file path is relative to the app user's home directory, e.g. '/data/user/0/com.package.name.

adb shell run-as com.package.name cp relative/path/file.ext /sdcard
adb pull /sdcard/file.ext

See long explanation below.

@rbo
rbo / Podman-on-MacOS.md
Last active September 1, 2021 13:42
Podman on Mac OS
$ export PATH=$(pwd):$PATH
$ podman-machine create box
Podman machine "box" already exists
$ podman-machine start box
Starting "box"...
@karstengresch
karstengresch / 3scale_Install.asciidoc
Created March 26, 2019 21:13 — forked from gsaslis/3scale_Install.asciidoc
Deploy 3scale API Management on Minishift

Installing 3scale on your Laptop

Pre-requisites

.or your desktop. Or a VM in the cloud. Or wherever it is you want to deploy 3scale to start exploring!
  • ❏ Minishift: 3scale is currently targeted for deployment on openshift, and minishift is the recommended development environment for that.

  • oc command-line tool [optional. you can also use the web-based interface.]

tl;dr