Skip to content

Instantly share code, notes, and snippets.

@SwitHak
SwitHak / 20211210-TLP-WHITE_LOG4J.md
Last active October 14, 2025 08:35
BlueTeam CheatSheet * Log4Shell* | Last updated: 2021-12-20 2238 UTC

Security Advisories / Bulletins / vendors Responses linked to Log4Shell (CVE-2021-44228)

Errors, typos, something to say ?

  • If you want to add a link, comment or send it to me
  • Feel free to report any mistake directly below in the comment or in DM on Twitter @SwitHak

Other great resources

  • Royce Williams list sorted by vendors responses Royce List
  • Very detailed list NCSC-NL
  • The list maintained by U.S. Cybersecurity and Infrastructure Security Agency: CISA List
@douglascayers
douglascayers / JWT.cls
Last active October 21, 2022 19:19
Sign a JWT token with only a private key
/**
* Inspired by the JWT repo by Salesforce Identity
* https://github.com/salesforceidentity/jwt/
*
* Inspired by the JWT repo by Auth0
* https://github.com/auth0/java-jwt
*
* Learn more about JWT at https://jwt.io
*/
public inherited sharing class JWT {
@andy-thomason
andy-thomason / Genomics_A_Programmers_Guide.md
Created May 14, 2019 13:32
Genomics a programmers introduction

Genomics - A programmer's guide.

Andy Thomason is a Senior Programmer at Genomics PLC. He has been witing graphics systems, games and compilers since the '70s and specialises in code performance.

https://www.genomicsplc.com

@douglascayers
douglascayers / delete-orphaned-local-branches.sh
Last active March 7, 2025 18:26
Delete local branches that no longer exist on a remote
#!/bin/bash
# https://gist.github.com/douglascayers/661eef9ff9f45a49b2025f6cbdc5679e
set -e
# Get the name of the currently checked out branch.
current_branch=$(git branch --show-current)
# Delete all local branches whose remote branch no longer exists, excluding the current branch.
@douglascayers
douglascayers / tasks.json
Last active January 30, 2024 22:27
Simple tasks for Visual Studio Code to deploy/retrieve/delete the currently opened file, or an entire folder, using Salesforce CLI force:source commands.
{
"version": "2.0.0",
"tasks": [
{
"label": "SFDX: Deploy Current File",
"type": "shell",
"command": "sfdx",
"args": [
"force:source:deploy",
"--sourcepath",
@NilsSchlueter
NilsSchlueter / HyperasMediumExampleModelFnc.py
Created December 1, 2018 13:34
Hyperas Colab Model Function Example
def model(X_train, Y_train, X_test, Y_test):
'''
Model providing function:
Create Keras model with double curly brackets dropped-in as needed.
Return value has to be a valid python dictionary with two customary keys:
- loss: Specify a numeric evaluation metric to be minimized
- status: Just use STATUS_OK and see hyperopt documentation if not feasible
The last one is optional, though recommended, namely:
- model: specify the model just created so that we can later use it again.
'''
@iamthefbi
iamthefbi / gist:5e516f88e7ce10eeafabe60cd63fdcb3
Created July 10, 2018 08:03
Salesforce Objects with IsDeleted field - by Chuck Liddell
acceptedeventrelation = true
account = true
accountcleaninfo = true
accountcontactrole = true
accountfeed = true
accounthistory = true
accountpartner = true
accountshare = true
actionlinkgrouptemplate = true
actionlinktemplate = true
@techman97
techman97 / apexUATPrep.script
Created June 20, 2018 00:33
Changing Sandbox Passwords and Setting Password (UAT Prep)
Set<String> setProfiles = new Set<String>();
setProfiles.add('Profile 1');
setProfiles.add('Profile 2');
setProfiles.add('Add more profiles or delete this line');
List<User> lstUsers = new List<User>();
for(User objUser : [SELECT Id, Name, Email FROM User WHERE IsActive=TRUE AND Profile.Name IN :setProfiles]) {
String strEmail = objUser.Email;
@michalbcz
michalbcz / disable-ssl-verification.groovy
Created May 14, 2018 13:01
Java/Groovy disable SSL verification
import java.io.InputStreamReader;
import java.io.Reader;
import java.net.URL;
import java.net.URLConnection;
import javax.net.ssl.HostnameVerifier;
import javax.net.ssl.HttpsURLConnection;
import javax.net.ssl.SSLContext;
import javax.net.ssl.SSLSession;
import javax.net.ssl.TrustManager;