This file contains 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 @httppost,@apiid,@apistatusCode,@apiresponse,@apitoken | |
SET @apiid = '{"client_id": "client_id","client_secret": "client_secret", "grant_type": "client_credentials","account_id": "MID"}' /* Forming up the string for getting the access token */ | |
SET @httppost = HTTPPost2("https://xyz.auth.marketingcloudapis.com/v2/token","application/json",@apiid,true,@apiresponse,@responseRows) /* Making a POST call to get access token */ | |
IF(@httppost == "200") Then /* If status is Sucess */ | |
set @rows = BuildRowsetFromString(@apiresponse,'"') /* Split the rows based on '"' string */ | |
set @rowCount = rowCount(@rows) | |
if @rowCount > 0 then | |
for @i = 1 to @rowCount do | |
var @apitoken |
This file contains 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 | |
_ContactID ContactID | |
, _DeviceID DeviceID | |
, _APID APID | |
, _Status Status | |
, _Source Source | |
, _SourceObjectId SourceObjectId | |
, _Platform Platform | |
, _PlatformVersion PlatformVersion | |
, _Alias Alias |
This file contains 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 language=javascript runat=server> | |
Platform.Load("core", "1") | |
var b1 = DataExtension.Init("Test_AddSubscribers"); | |
var data = b1.Rows.Lookup(["IsSubscriber"], ["False"]); | |
if(data){ | |
for (var i = 0; i < data.length; i++){ | |
var status; | |
var EmailAddress = data[i]["EmailAddress"]; | |
if(EmailAddress && EmailAddress != ""){ | |
var results = Subscriber.Retrieve({ |
This file contains 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 @debug | |
var @jid | |
var @listid | |
var @batchid | |
var @email | |
var @skey | |
var @reason | |
var @unsubscribeAll |
This file contains 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 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
cat ~/.ssh/id_rsa.pub | ssh user@hostname -i ~/.ssh/key.key 'cat >> .ssh/authorized_keys' |
This file contains 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
if not empty (@token) then | |
set @rows = LookupRows("Rest api authorization","AccessToken",@token) | |
set @rowCount = rowcount(@rows) | |
if @rowCount > 0 then | |
If @action=="get" and not empty (@entrycode) then | |
set @rows = LookupRows("Register","EntryCode",@entrycode) | |
set @rowCount = rowcount(@rows) | |
If @rowCount==0 then | |
output(v(@JsonNotFound)) |
This file contains 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
# | |
# Hardened OpenVPN server on Ubuntu 16.04 | |
# repeatable config generation script at end | |
# | |
# TOC | |
# ---- | |
# 1. SERVER | |
# 2. NETWORKING | |
# 3. CLIENTS | |
# 3.1. REPEAT FOR EACH CLIENT |
This file contains 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
# Generate key pair and revocation certificate. | |
gpg --gen-key | |
gpg --output revoke.asc --gen-revoke <key-id> | |
# Export ASCII copy of the public key | |
gpg --export --armor <key-id> > pubkey.asc | |
# Publish the public key | |
gpg --send-keys <key-id> |
NewerOlder