Skip to content

Instantly share code, notes, and snippets.

View matthewadowns's full-sized avatar

Matthew Downs matthewadowns

View GitHub Profile
@matthewadowns
matthewadowns / git-create-branch.sh
Last active October 28, 2022 20:31
Quickly push a new branch upstream when checking out a new branch with this shell function and alias
# Add this to your shell profile (e.g. .zshrc or .bashrc)
publishBranch() {
git checkout -b $1
git push -u origin $1
}
alias gcb=publishBranch
#########################
@matthewadowns
matthewadowns / settings.json
Last active August 5, 2021 18:15
VSCode configuration for PETAL stack with IntelliSense for TailwindCSS in Elixir templates
{
"auto-close-tag.activationOnLanguage": [
"blade",
"cfml",
"eex",
"ejs",
"erb",
"html-eex",
"javascript",
"javascriptreact",
@matthewadowns
matthewadowns / Map_Adobe_MCVID.js
Last active August 29, 2015 14:24
For use with AppMeasurement.js or s_code.js --a snippet to map the Adobe Marketing Cloud Visitor ID to itself with an alias name for Customer Attributes.
/**
* Supports Demandbase Customer Attributes integration
* Map the MCVID to itself via the alias "demandbase"
*/
(function(){
function map_mcvid(retry) {
var mcvid = visitor.getMarketingCloudVisitorID();
if (mcvid) {
visitor.setCustomerIDs({ "demandbase": mcvid });
//Optional - send to Conversion Variable: s.eVar# = mcvid;
@matthewadowns
matthewadowns / Map_Adobe_MCVID_DTM.js
Last active August 29, 2015 14:21
For use with Adobe DTM --a snippet to map the Adobe Marketing Cloud Visitor ID to itself with an alias name for Customer Attributes.
(function(){
function map_mcvid(retry) {
var sat = window._satellite;
if('undefined' !== typeof sat && sat.getVisitorId()) {
var mcvid = sat.getVisitorId().getMarketingCloudVisitorID();
if (mcvid) {
sat.getVisitorId().setCustomerIDs({ "demandbase": mcvid });
} else if (retry) {
window.setTimeout(function() { map_mcvid(false) }, 1000);
}
<result>
<company-name>Advance Magazine Publishers</company-name>
<demandbase-sid type="integer">1334313</demandbase-sid>
<audience>Enterprise Business</audience>
<audience-segment>Media & Entertainment</audience-segment>
<industry>Media & Entertainment</industry>
<sub-industry>Publisher</sub-industry>
<company-size>Over $5B</company-size>
<employee-count type="integer">37200</employee-count>
<isp type="boolean">false</isp>