Skip to content

Instantly share code, notes, and snippets.

View h0h0h0's full-sized avatar

Shaun Farrugia h0h0h0

View GitHub Profile
@xixiaofinland
xixiaofinland / sfdx-cheatsheet.sh
Last active March 28, 2024 18:54
Salesforce SFDX Cheat Sheet
# Proudly supplied by Salesforce Way Site: https://salesforceway.com
# This cheatsheet contains the most often used SFDX commands for beginners to get a jumpstart.
# Hint. it is highly recommended to use `-h` to check the usage of any SFDX commands and corresponding parameters.
# For instance, use `sfdx force:auth:web:login -h` to checke what `-d` `-a` parameters do
# List down all supported dx commands:
sfdx force:doc:commands:list
# Check current DebHub and Scratch Org status
sfdx force:org:list
@alican
alican / django_field_update_checker.txt
Last active September 17, 2023 08:46
check if django model fields changed after save
class DjangoModel(models.Model):
@classmethod
def from_db(cls, db, field_names, values):
instance = super().from_db(db, field_names, values)
instance._state.adding = False
instance._state.db = db
instance._old_values = dict(zip(field_names, values))
return instance
@Vaguery
Vaguery / gist:83088b27c557dfbb0617
Created June 10, 2014 12:44
Wrestling with Swift identity functions
import Cocoa
// This is a Swift Playground to explore some unexpected behavior of '==='.
//
// ICYMI, '===' is the test of _identity_ in Swift; two values a,b are
// references to the same object if a === b
//
// My concern with this is the necessity of testing eqality and identity when
// manipulating complex graphs constructed automatically by code.
//