Skip to content

Instantly share code, notes, and snippets.

View psapir's full-sized avatar

Pato Sapir psapir

View GitHub Profile
<html>
<table>
<tr><td><wftcontent id=“bc1-b”></td><tr>
</table>
@psapir
psapir / fiddler.js
Created November 12, 2016 10:53
Fiddler Custom Rules example
static function OnBeforeResponse(oSession: Session) {
if (oSession.hostname.Contains("exacttarget.com"))
{
oSession.oResponse.headers.Add("Access-Control-Allow-Origin", "*");
}
if (m_Hide304s && oSession.responseCode == 304) {
oSession["ui-hide"] = "true";
}
}
@psapir
psapir / index.html
Last active November 12, 2016 10:30
Example of requesting landing pages locally
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" class="no-js" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Devs United, Inc.</title>
<script src="http://code.jquery.com/jquery-1.12.4.min.js"></script>
</head>
<body>
<script>
@psapir
psapir / gist:895d0b95b8c60073806c4a2d0174feff
Last active August 12, 2016 17:32
Distributing Rows Equally with Query Activities
SELECT FirstName, EmailAddress, NTILE(3) OVER(ORDER BY NewID() DESC) AS groupID
FROM Subscribers
@psapir
psapir / dataviews.js
Created May 29, 2016 11:11
Retrieving DataViews with AMPScript
%%[
var @rows
set @rows = LookupRows("_ListSubscribers","SubscriberKey",emailaddr)
]%%
@psapir
psapir / csv-ssjs.js
Created May 28, 2016 11:10
Creating a CSV download page with SSJS
Name,EmailAddress
Pato,[email protected]
Bill,[email protected]
<script runat=server>
Platform.Load("core", "1");
HTTPHeader.SetValue("content-disposition","attachment; filename='test.csv'");
</script>