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="text/javascript"> | |
var abtestValue = "", runTest = false; | |
var windowLocation = window.location.pathname; | |
var mapArr = new Array(); | |
mapArr.push({ "url" : "/url.html", "id" : "99999999-99" }); | |
mapArr.push({ "url" : "/url.html", "id" : "99999999-99" }); | |
mapArr.push({ "url" : "/url.html", "id" : "99999999-99" }); | |
mapArr.push({ "url" : "/url.html", "id" : "99999999-99" }); |
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 password = { | |
v: "", | |
update: function() { | |
this.v = $("#pass").val(); | |
} | |
} | |
var criteria = { | |
update: function() { | |
password.update(); | |
}, |
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
#!/bin/bash | |
#simple script to setup a new front-end project | |
echo 'make in:' | |
echo $1 | |
mkdir $1 | |
mkdir $1/css | |
touch $1/css/styles.css | |
mkdir $1/img |
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
<?php | |
// get country (requires Smart IP installed) | |
$smart_ip_session = smart_ip_session_get('smart_ip'); | |
$user_country = $smart_ip_session['location']['country']; | |
// execute a query against the international_data content type using field_location_name | |
$query = new EntityFieldQuery(); | |
$query | |
->entityCondition('entity_type', 'node') |
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
<?php | |
/* | |
* CRH: 3/24/13 | |
* Backup Script | |
* - This script will back up all files in public_html to a .tar.gz | |
* - It will also dump the complete set of mysql databases to a .tar.gz | |
* - It will send those files to an offsite location via FTP, in addition to locally | |
* storing them | |
* - It will send an e-mail with the results |
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
<?php | |
$staging = "http://marketostaging.domain.com/index.php/leadCapture/save"; | |
$production = "http://marketoproduction.domain.com/index.php/leadCapture/save"; | |
$url = ''; | |
if (isset($_GET["s"])) { | |
$stagingFlag = $_GET["s"]; |
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
<?php | |
// Marketo Web Service | |
// define the API key | |
$apikey = ''; | |
$staging = 'secretkey'; | |
$production = 'secretkey'; | |
if (isset($_GET["s"])) { | |
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
/* wistiaJQuery(document).bind("wistia-popover", function(event, iframe) { | |
iframe.wistiaApi.time(30).play(); | |
iframe.wistiaApi.bind("end", function() { | |
alert("The video ended!"); | |
}); | |
}); */ | |
$(document).ready(function() { | |
$("a.fancybox").fancybox(); |
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 arraySum(i) { | |
// i will be an array, containing integers, strings and/or arrays like itself. | |
// Sum all the integers you find, anywhere in the nest of arrays. | |
var intTotal = 0; | |
for (var j = 0; j < i.length; j++) | |
{ | |
if (typeof(i[j]) === 'number') { |
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 longestString(i) { | |
// i will be an array. | |
// return the longest string in the array | |
var longestIndex = -1; | |
for (var j = 0; j < i.length; j++) { | |
var curStr = i[j]; |
OlderNewer