Skip to content

Instantly share code, notes, and snippets.

View reikjarloekl's full-sized avatar

Jörn Bungartz reikjarloekl

  • Parker, CO
  • 07:12 (UTC -06:00)
View GitHub Profile
@reikjarloekl
reikjarloekl / asset_category_of_linked_supporting_asset.groovy
Created September 4, 2022 11:00
Jira Cloud ScriptRunner - Scripted field filled with asset category taken from linked asset issue
def assetKey = issue.fields?.issuelinks?.find{it.type.name == "Affected asset"}?.outwardIssue?.key
if (assetKey == null) return "No asset linked"
def assetIssue = Unirest.get("/rest/api/2/issue/" + assetKey).asJson().getBody().object
return Optional.ofNullable(assetIssue.fields.customfield_10267?.find{true}?.value).orElse("No category set")
@reikjarloekl
reikjarloekl / set_postman_options_to_staging.php
Created January 31, 2022 13:34
Automatically set Postman options to staging settings (mailhog running on same server) after cloning a wordpress site to staging. Adapt to your needs!
add_action( 'wp_loaded', 'set_postman_staging_settings');
function set_postman_staging_settings() {
$staging_options = [
"enc_type" => "none",
"hostname" => "localhost",
"port" => 1025,
"sender_email" => "info@yourdomain.de",
"envelope_sender" => "info@yourdomain.de",
@reikjarloekl
reikjarloekl / reprocess_thrive_apprentice_product_access.php
Created January 30, 2022 22:03
Reprocess Thrive Apprentice product access after adding a Thrive Product to a WooCommerce Product
/**
* Add a custom action to order actions select box on edit order page
*
* @param array $actions order actions array to display
* @return array - updated actions
*/
function ta_wc_add_order_meta_box_action( $actions ) {
global $theorder;
// add "Reprocess TA product access" custom action
@reikjarloekl
reikjarloekl / shellexecute-nonblocking.iss
Last active December 16, 2021 15:14 — forked from jakoch/unzip.iss
Helper for executing executables without blocking the InnoSetup GUI
// Based on code written by Rik and Jens A. Koch (@jakoch) on StackOverflow:
// http://stackoverflow.com/questions/32256432/how-to-execute-7zip-without-blocking-the-innosetup-ui
[Code]
#IFDEF UNICODE
#DEFINE AW "W"
#ELSE
#DEFINE AW "A"
#ENDIF
@reikjarloekl
reikjarloekl / windows-terminal-snippet-ssh-screen
Created June 3, 2020 15:29
Setting for Windows Terminal to open ssh connection and (re-)connect to screen session
{
"guid": "{b2ea4eb4-ab63-4710-a082-7263af541f2a}",
"hidden": false,
"name": "SSH: Machine Name",
"commandline": "powershell.exe -command \"ssh.exe -t some.host.name 'screen -S myscreen -rd || screen -S myscreen bash -l'\"",
"hidden": false,
"suppressApplicationTitle": true
},