Skip to content

Instantly share code, notes, and snippets.

View Damecek's full-sized avatar

Adam Damecek

View GitHub Profile
@Damecek
Damecek / gist:8b76cc18ecea4d4d8ae83bc69fa9c19c
Created August 28, 2025 12:20
Chainable framework apex
public abstract class Chainable implements Queueable {
private Chainable next;
private ChainableContext context;
public Chainable() {
this.context = new BaseContext();
}
protected abstract void execute(ChainableContext context);

Keybase proof

I hereby claim:

  • I am damecek on github.
  • I am damecek (https://keybase.io/damecek) on keybase.
  • I have a public key ASCK6qFeX7XgmZD-37Mk_iLgvWGlhBoJmx1-cRLAa0GPqwo

To claim this, I am signing this object:

@Damecek
Damecek / URL_Alias_Navigator.js
Last active February 22, 2024 12:13
Streamline Salesforce navigation with this Tampermonkey script. Quickly jump to key pages using aliases, directly from your browser. Ideal for devs and admins.
// ==UserScript==
// @name URL Alias Navigator
// @version 2.0
// @description Navigate using aliases
// @author Damecek
// @match https://*.lightning.force.com/*
// @match https://*.sandbox.lightning.force.com/*
// @grant none
// @require https://unpkg.com/quick-score@0.2.0/dist/quick-score.min.js
// ==/UserScript==
@Damecek
Damecek / visualized.html
Created January 19, 2024 13:16
Small html page used for visualizing dependency from happysoup.io
<!DOCTYPE html>
<html>
<head>
<title>Dependency Graph Visualization</title>
<script src="https://d3js.org/d3.v5.min.js"></script>
<style>
body, html {
margin: 0;
padding: 0;
width: 100%;
@Damecek
Damecek / getLastOpenWI.sh
Created October 12, 2023 14:44
Queries and returns url for the last created WI
#!/bin/bash
# Execute the SOQL query
QUERY_RESULT=$(sf data query -o carvago-prod --query "SELECT Id FROM sf_devops__Work_Item__c ORDER BY CreatedDate DESC LIMIT 1" --result-format csv)
# Get the record ID from the result. We select the second line (actual data) and then cut by ',' to get the ID.
RECORD_ID=$(echo "$QUERY_RESULT" | awk 'NR==2' | cut -d',' -f2)
# Form the URL
URL="https://carvago.lightning.force.com/sf_devops/DevOpsCenter.app?workItemId=$RECORD_ID"
@Damecek
Damecek / deployPermSetFields.sh
Created October 7, 2023 19:20
Deploy fields from permission set metadata
#!/bin/bash
# Usage
# /bin/bash ./deployPermSetFields.sh ./force-app/main/default/permissionsets/Logistic_Edit.permissionset-meta.xml
# Get the XML file name from the script argument
xml_file=$1
# Use awk to extract field names
fields=$(awk -F'[<>]' '/<field>/ {print $3}' $xml_file)