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
component { | |
boolean function onRequestStart( required string targetPage ) { | |
var headers = getHttpRequestData().headers; | |
var origin = ''; | |
var PC = getpagecontext().getresponse(); | |
// Find the Origin of the request | |
if( structKeyExists( headers, 'Origin' ) ) { |
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
;(function(u){ | |
/** | |
* @desc Map your OneTrust tag IDs here to Tealium Template IDs found in utag.loader.cfg object like this: | |
* @param "OneTrust_tag_id": "Tealium_tid", | |
* @return You can add more lines to suit your tag library in both tools | |
*/ | |
// Begin Config | |
var oneTrustTagIdToTealiumTemplateIdConfig = { | |
"81878": "7110", // e.g.: Google Analytics |
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
/**************************** | |
* Find Broken Urls In Your Account | |
* Version 1.1 | |
* ChangeLog v1.1 | |
* - Updated to only see Text Ads | |
* Created By: Russ Savage | |
* FreeAdWordsScripts.com | |
****************************/ | |
function main() { | |
// You can add more if you want: http://goo.gl/VhIX |
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
function() { | |
return function(model) { | |
var globalSendTaskName = '_' + model.get('trackingId') + '_sendHitTask'; | |
// Hook the sendHitTask - grab an original reference to a function | |
var originalSendTask = window[globalSendTaskName] = window[globalSendTaskName] || model.get('sendHitTask'); | |
model.set('sendHitTask', function(sendModel) { //overwrite sendHitTask with our code | |
var hitPayload = sendModel.get('hitPayload'); | |
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
(function() { | |
// Set the timeout for when the dataLayer history should be purged. The default is 30 minutes. | |
// The timeout needs to be in milliseconds. | |
var timeout = 30*60*1000; | |
// Change dataLayerName only if you've defined another named for the dataLayer array in your | |
// GTM container snippet. | |
var dataLayerName = 'dataLayer'; | |
// Don't change anything below. |
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
import com.google.api.client.extensions.java6.auth.oauth2.AuthorizationCodeInstalledApp; | |
import com.google.api.client.extensions.jetty.auth.oauth2.LocalServerReceiver; | |
import com.google.api.client.auth.oauth2.Credential; | |
import com.google.api.client.googleapis.auth.oauth2.GoogleAuthorizationCodeFlow; | |
import com.google.api.client.googleapis.auth.oauth2.GoogleClientSecrets; | |
import com.google.api.client.googleapis.javanet.GoogleNetHttpTransport; | |
import com.google.api.client.http.HttpTransport; | |
import com.google.api.client.json.JsonFactory; | |
import com.google.api.client.json.jackson2.JacksonFactory; | |
import com.google.api.client.util.store.DataStoreFactory; |
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
/** | |
* Retrieves all the rows in the active spreadsheet that contain data and logs the | |
* values for each row. | |
* For more information on using the Spreadsheet API, see | |
* https://developers.google.com/apps-script/service_spreadsheet | |
*/ | |
function readRows() { | |
var sheet = SpreadsheetApp.getActiveSheet(); | |
var rows = sheet.getDataRange(); | |
var numRows = rows.getNumRows(); |
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
Show hidden characters
{ | |
"shell_cmd": "groovy \"${file}\"", | |
"selector": "*.groovy", | |
"working_dir": "${file_path}", | |
"file_regex": "[ ]*at .+[(](.+):([0-9]+)[)]" | |
} |
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
<scheme name="Eclectide Monokai" version="142" parent_scheme="Default"> | |
<option name="EDITOR_FONT_SIZE" value="12" /> | |
<option name="EDITOR_FONT_NAME" value="Consolas" /> | |
<colors> | |
<option name="ADDED_LINES_COLOR" value="295622" /> | |
<option name="ANNOTATIONS_COLOR" value="b2c0c6" /> | |
<option name="CARET_COLOR" value="bbbbbb" /> | |
<option name="CARET_ROW_COLOR" value="" /> | |
<option name="CONSOLE_BACKGROUND_KEY" value="1c1c1c" /> | |
<option name="FILESTATUS_ADDED" value="629755" /> |
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
// MySQL to Google Spreadsheet By Pradeep Bheron | |
// Support and contact at pradeepbheron.com | |
function myMySQLFetchData() { | |
var conn = Jdbc.getConnection('jdbc:mysql://127.0.0.1:3306/employee_db', 'username', 'pass'); // Change it as per your database credentials | |
var stmt = conn.createStatement(); | |
var start = new Date(); // Get script starting time | |