# Get the last commit SHA
git log -1 --format='%H' # long sha
git log -1 --format='%h' # short sha
Get the branch name only.
git rev-parse --abbrev-ref HEAD
# Get the last commit SHA
git log -1 --format='%H' # long sha
git log -1 --format='%h' # short sha
Get the branch name only.
git rev-parse --abbrev-ref HEAD
# Get the name of each field on an object, by parsing its JSON description with jq | |
sfdx force:schema:sobject:describe --json -s account | jq -r '.result.fields[] | .name' |
sfdx force:data:soql:query -q "SELECT DataType, QualifiedApiName FROM FieldDefinition WHERE EntityDefinitionId = '$_OBJECTID'" -t |
sfdx force:schema:sobject:describe -s $_OBJECT --json | jq '[.result.childRelationships[] | {field, childSObject, relationshipName}]' |
for (let t of base.tables) { | |
let md = `#### ${t.name}\n`; | |
for (let f of t.fields) { | |
md += `\n- ${f.name}`; | |
} | |
output.markdown(md); | |
} |
# Get only the name of the current directory | |
basename $PWD | |
# ~ | |
# Set an array var | |
set _shows 'The Office' 'It\'s Always Sunny in Philadelphia' | |
# For loop | |
for _show in $_shows | |
echo "I love $_show!" |
-- This requires setting the shortcut for "Turn Do Not Disturb On/Off" to "shift + cmd + D" | |
tell application "System Events" | |
keystroke "D" using {command down, shift down} | |
end tell |
set dt to current date | |
set time of dt to 0 | |
log dt | |
tell application "Things3" | |
set toDos to to dos in list "Today" | |
set str to "" | |
repeat with td in toDos | |
try |