Skip to content

Instantly share code, notes, and snippets.

View kellyjandrews's full-sized avatar
I don't get it.

Kelly Andrews kellyjandrews

I don't get it.
View GitHub Profile
@kellyjandrews
kellyjandrews / gist:8857288
Created February 7, 2014 04:13
Heroku Errors
error: Compiling of 'vendor/node/lib/node_modules/npm/cli.js' failed. Line 1: Unexpected token ILLEGAL ; Compiling of 'vendor/node/lib/node_modules/npm/bin/npm-cli.js' failed. Line 1: Unexpected token ILLEGAL ; Compiling of 'vendor/node/lib/node_modules/npm/scripts/index-build.js' failed. Line 1: Unexpected token ILLEGAL
07 Feb 04:10:25 - error: Compiling of 'vendor/node/lib/node_modules/npm/cli.js' failed. Line 1: Unexpected token ILLEGAL ; Compiling of 'vendor/node/lib/node_modules/npm/bin/npm-cli.js' failed. Line 1: Unexpected token ILLEGAL ; Compiling of 'vendor/node/lib/node_modules/npm/scripts/index-build.js' failed. Line 1: Unexpected token ILLEGAL ; Compiling of 'vendor/node/lib/node_modules/npm/node_modules/child-process-close/index.js' failed. Line 9: Illegal return statement,Line 13: Illegal return statement ; Compiling of 'vendor/node/lib/node_modules/npm/node_modules/opener/opener.js' failed. Line 1: Unexpected token ILLEGAL ; Compiling of 'vendor/node/lib/node_modules/npm/node_modules/rim
@kellyjandrews
kellyjandrews / singleDataPoint
Created April 17, 2014 12:56
Dynamic Content Samples
%%[
var @rows,@row,@key,@percent,@contentPath
set @key = _subscriberkey
set @rows = LookupRows("Common_Subscriber_View","SubscriberKey",@key)
if RowCount(@rows) == 1 then
set @row = Row(@rows,1)
set @percent = Field(@row,"Percentage_Complete")
else
@kellyjandrews
kellyjandrews / GTL-Sample
Last active August 29, 2015 14:04
Guide Sample Scripts
%%{={{ }}=}%%
<html>
<head>
<style>
body {font-family: "Helvetica"}
h1,h2,h3,h4,h5,h6,p{padding: 0; margin:0;}
.header {padding-top:12px;}
</style>
</head>
<body>
@kellyjandrews
kellyjandrews / 01-Request Token
Last active August 29, 2015 14:06
Hands On Training - Fuel API
POST https://auth.exacttargetapis.com/v1/requestToken
Content-Type application/json
{
"clientId": "xxxxxxxxxxxxxxx",
"clientSecret": "xxxxxxxxxxxxxxx"
}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width"/>
<style>
#outlook a {
padding:0;
}
POST: https://www.exacttargetapis.com/interaction-experimental/v1/events
Content-Type: application/json
Authorization Bearer <<token>>
{
"ContactKey" : "XXXXXXXXX",
"EventDefinitionKey" : "CONTACT-EVENT-XXXXXXXXX",
"Data" : {
@kellyjandrews
kellyjandrews / 01MessageDefinitionSends.md
Last active August 29, 2015 14:09
Message Definition Send Examples

In order to add the content directly as HTML - make sure the data extension contains "html_content" as a field. Set it to text, and leave the length blank.

Once you have that, then you can pass in the email file with very minimal content, or you can build out a full template based on each of your email types. Also note that you can split these up quite a bit - so your template can have much of the framework, and you can pass in a series of parameters in the REST payload that pull in specific content areas, so you don't have to code out your entire message. Multiple ways to approach this.

It all mostly depends on your data, how much you want to store, and how streamlined you want your process. Another item - I'm using email address as the subscriber key - but this can be any unique identifier.

@kellyjandrews
kellyjandrews / .bashrc
Last active September 26, 2016 13:17
Useful Bash Scripts
export NVM_DIR="/Users/kellyandrews/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm
# Basic Aliases
alias rs='source ~/.bashrc'
alias atom='open -a Atom'
alias apps='cd ./apps'
#file specific
2017-05-10T12:33:47.703Zalpinebuild/pull started
2017-05-10T12:33:48.004Zalpinebuild/pull finished successfully
2017-05-10T12:33:49.798ZalpinePATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
2017-05-10T12:33:49.798ZalpineHOSTNAME=0744ec84f7bb
2017-05-10T12:33:49.798ZalpineTERM=xterm
2017-05-10T12:33:49.798ZalpineCI_REPO_NAME=branch-testing
2017-05-10T12:33:49.798ZalpineCI=true
2017-05-10T12:33:49.798ZalpineCI_COMMIT_DESCRIPTION=1.0.0
2017-05-10T12:33:49.798ZalpineCI_COMMITTER_USERNAME=kellyjandrews
2017-05-10T12:33:49.798ZalpineCI_COMMITTER_EMAIL=kelly@kellyjandrews.com