This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select | |
zip | |
, cos(radians(latitude)) * cos(radians(longitude)) xaxis | |
, cos(radians(latitude)) * sin(radians(longitude)) yaxis | |
, sin(radians(latitude)) zaxis | |
from zip_axis | |
/* credit https://stackoverflow.com/a/2233208/812377 */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type="javascript" runat="server"> | |
Platform.Load("core","1.1.5"); | |
var DE = "Contacts_To_Delete"; | |
var logDE = "Contacts_To_Delete_Log"; | |
var log = DataExtension.Init(logDE); | |
var url = 'https://auth.exacttargetapis.com/v1/requestToken'; | |
var contentType = 'application/json'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Aliases | |
alias c="clear" | |
alias ll="ls -lah" | |
alias lz="ls -laZ" # include (selinux) security context in listing | |
alias cl="c && ll" | |
alias ..="cd .." | |
# Empty contents of files | |
empty() { | |
for arg in "$@" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<style> | |
body, a, input {font-family:sans-serif;} | |
</style> | |
</head> | |
<body style="font-family:sans-serif"> | |
%%=now()=%% | |
<h1>XML Parse with AMPScript</h1> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%%[ | |
VAR @ProductName | |
SET @ProductName = "Mobile phone" | |
]%% | |
<script runat=server> | |
Platform.Load("Core","1"); | |
//Get the Variable from AMPscript |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%%[ | |
var @day, @suffix | |
for @day = 1 to 31 do | |
/* set @day = Format(Now(),"dd") */ | |
/* adapted from http://stackoverflow.com/a/13627586/812377 */ | |
if mod(@day,10) == 1 and mod(@day,100) != 11 then |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%%[ | |
var @num1, @num2, @num3, @lowestNum | |
/* force strings to be numbers */ | |
set @num1 = add('105.54',0) | |
set @num2 = add('88.73',0) | |
set @num3 = add('106.32',0) | |
/* find lowest with method outlined here: http://stackoverflow.com/a/9424226/812377 */ | |
set @lowestNum = iif(@num1 < iif(@num2 < @num3, @num2, @num3), @num1, iif(@num2 < @num3, @num2, @num3)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script runat="server"> | |
Platform.Load("core", "1.1.1"); | |
function pruneRows () { | |
var DERowKeys = DataExtension.Init("DEofRowKeys"); | |
var DERowKeyRows = DERowKeys.Rows.Lookup(["ProcessedFlag"], [0], 50, "RowDate"); | |
var returnString = ""; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select | |
a.customerID | |
, s.emailAddress | |
from EnterpriseAttributes a | |
inner join _Subscribers s on (s.subscriberID = a.subscriberID) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<body style="font-family:sans-serif"> | |
<a href="%%profile_center_url%%">Base - Profile/Preference Center</a> | |
<br/><a href="%%subscription_center_url%%">Base - Subscription Center</a> | |
<br/><a href="%%unsub_center_url%%">Base - One-Click Unsubscribe</a> | |
<br/><a href='%%=MicrositeURL(1111,"subscriberMID", "4444")=%%'>Custom Profile/Preference Center</a> | |
<br/><a href='%%=MicrositeURL(2222,"subscriberMID", "4444")=%%'>Custom Subscription Center</a> | |
<br/><a href='%%=MicrositeURL(3333,"subscriberMID", "4444")=%%'>One-Click Unsubscribe</a> | |
<p>This email was sent by: | |
<b>%%Member_Busname%%</b> |