Skip to content

Instantly share code, notes, and snippets.

@sultanshakir
sultanshakir / DeKalbParcelFormat
Last active October 9, 2025 11:05
DeKalb County GA Parcel ID format
# 📌 Formats parcel IDs into spaced DeKalb County format (e.g. 1508504015 → 15 085 04 015)
=IF(A2="","",REGEXREPLACE(REGEXREPLACE(TO_TEXT(A2),"\D",""),"(\d{2})(\d{3})(\d{2})(\d{3})","$1 $2 $3 $4"))
Goal CSS 3 XPath
All Elements * //*
All P Elements p //p
All Child Elements p>* //p/*
Element By ID #foo //*[@id=’foo’]
Element By Class .foo //*[contains(@class,’foo’)]
Element With Attribute *[title] //*[@title]
First Child of All P p>*:first-child //p/*[0]
All P with an A child Not possible //p[a]
Next Element p + * //p/following-sibling::*[0]
@sultanshakir
sultanshakir / gist:e717b8a62a13574c8993e039570cd091
Created May 5, 2020 19:10
invoking lambda from CLI requires base64
add "--cli-binary-format raw-in-base64-out" with your command
i.e
aws lambda invoke --function-name foo_bar --payload file://payload.json --cli-binary-format raw-in-base64-out response.txt
@sultanshakir
sultanshakir / sshakir_find_fin.prg
Created October 11, 2018 22:20
Find FIN from PersonID and EncounterID
drop program sshakir_find_fin go
create program sshakir_find_fin
prompt
"Output to File/Printer/MINE" = "MINE"
, "Person Id:" = 0
, "Encounter Id:" = 0
with OUTDEV, PERSONID, ENCNTRID
@sultanshakir
sultanshakir / loopThroughObject.js
Created March 27, 2018 16:01
Loop through or enumerate a JavaScript object
for (var key in p) {
if (p.hasOwnProperty(key)) {
console.log(key + " -> " + p[key]);
}
}
@sultanshakir
sultanshakir / cnvttojson.js
Created March 18, 2018 05:37
Turns Array keys into JSON keys
module.exports = (dataToConvert) => {
let data = {}
dataToConvert.forEach((val, index) => {
data[Object.keys(dataToConvert[index])] = Object.values(dataToConvert[index])[0]
})
return data;
}
' If you want to be sure that the static content has refreshed properly - take out the "/manager" part of the URL from the content management page, and replace it with:'
/custom_mpage_content/custom-components/js/custom-components.js
' That should let you download the JS file from the web server, rather than the code warehouse, so you can make sure that it has actually refreshed.
You can also refresh the static content by running the CCL program manually: '
mp_refresh_static_content "MINE", "custom_mpage_content"
@sultanshakir
sultanshakir / getcontentserviceurl.prg
Created September 18, 2017 04:14
CCL to get Content Service URL for custom components for static content refresh
select *
from dm_info d
where d.info_domain = "INS"
and d.info_name = "CONTENT_SERVICE_URL"
with time = 10
@sultanshakir
sultanshakir / iterm2-solarized.md
Created September 5, 2017 15:13 — forked from kevin-smets/iterm2-solarized.md
iTerm2 + Oh My Zsh + Solarized color scheme + Meslo powerline font + [Powerlevel9k] - (macOS)

Default

Default

Powerlevel9k

Powerlevel9k

@sultanshakir
sultanshakir / combinemultiplecsv.sh
Created June 5, 2017 06:24
Combine multiple .csv files
# run from within directory tha contains CSV files you want to combine
cat *.csv > combined.csv