Skip to content

Instantly share code, notes, and snippets.

View Opus1no2's full-sized avatar
🏠
Working from home

Travis Tillotson Opus1no2

🏠
Working from home
View GitHub Profile
OOo.addEventListener(window, 'load', function () {
oo_exit.interruptShow = true;
}, false);
@Opus1no2
Opus1no2 / customVarPoc.js
Last active August 29, 2015 14:06
Dynamic custom variable object
var rawData = [{foo: 'bar'}, {bar: 'baz'}, {red: 'yellow'}];
function generateCustomVarObject(keyValue, rawData) {
customVariables = {}
for (i = 0; i < rawData.length; i++) {
customVariables[keyValue + i] = JSON.stringify(rawData[i]);
}
return customVariables;
}
var pathRay = window.location.pathname.split('/');
// Make sure that split returns
// an array of at least 2 values
// the value we want will be the 2nd value
if (pathRay.length >= 2) {
var firstRoute = pathRay[1];
}
// Make sure the second value
Benchmarking cdn.opinionlab.com (be patient).....done
Server Software: AmazonS3
Server Hostname: cdn.opinionlab.com
Server Port: 443
SSL/TLS Protocol: TLSv1,AES256-SHA,2048,256
Document Path: /includes/universal/javascripts/compiled/cc-engine-5.1.min.js
Document Length: 133779 bytes
Benchmarking secure.opinionlab.com (be patient).....done
Server Software: Microsoft-IIS/6.0
Server Hostname: secure.opinionlab.com
Server Port: 443
SSL/TLS Protocol: TLSv1,RC4-MD5,2048,128
Document Path: /includes/universal/javascripts/compiled/cc-engine-5.1.min.js
Document Length: 133783 bytes
function addEvent(element, event, fn) {
if (element.addEventListener) {
element.addEventListener(event, fn, false);
} else if (element.attachEvent) {
element.attachEvent('on' + event, fn);
}
}
function newText() {
document.getElementById("ovText").innerHTML = "<span class='questionSpan reqQuestion'><label for='overall'>Overall Experience</label></span>";
}
@Opus1no2
Opus1no2 / ibm_cb
Last active August 29, 2015 14:05
<style>
#foot {padding-bottom:20px;}
.two_column #customer_service_links {
height: inherit;
}
.tooltip{
display: inline;
position: relative;
}
@Opus1no2
Opus1no2 / f.js
Created August 13, 2014 21:00
example
var lang = 'en',
omniture = s || {};
if (omniture.prop20 !== undefined) {
lang = s.prop20;
}
@Opus1no2
Opus1no2 / repodiff.rb
Last active August 29, 2015 14:04
repodiff
#!/usr/bin/env ruby
require 'pp'
require 'diff_dirs'
pp diff_dirs "~/oplab/UCC-template/Universal-Comment-Card-Template/public/includes/universal/", "~/oplab/CC-Secure/CommentCards.secure/includes/universal/"
cd #Takes you to home directory
cd - #Takes you to your previous directory
cd ../../ #Takes you back two directorys
cd ~/ #Takes you to the home directory
cd ~ #Takes you to the home directory
pwd #Path to working directory (tells you where you are)
ls -l #list directory contents
ls -a #list directory contents and hidden files
lsof -wni tcp:3000 #get PID for port 3000
time curl https://secure.opinionlab.com/includes/universal/images/foot-logo.png > /dev/null