Skip to content

Instantly share code, notes, and snippets.

View LindsayElia's full-sized avatar

Lindsay Elia LindsayElia

View GitHub Profile
/*
* isPalindrome
*
* Write a function which accepts an input word and return true or false if that word is a palindrome.
*/
var isPalindrome = function(word) {
// your code here
var result, startChar, endChar;
for (var i = 0; i <= (word.length -1)/2; i++){
@LindsayElia
LindsayElia / keybase.md
Created March 5, 2015 23:17
keybase.md

Keybase proof

I hereby claim:

  • I am LindsayElia on github.
  • I am olarklindsay (https://keybase.io/olarklindsay) on keybase.
  • I have a public key whose fingerprint is F8DF 09F4 49B3 CC78 5F81 A936 5F53 EB6A AF7C 4D6A

To claim this, I am signing this object:

@LindsayElia
LindsayElia / gist:11385385
Created April 28, 2014 22:04
Olark configure - Before Chat Header (for Accellion)
<!-- begin olark code -->
<script data-cfasync="false" type='text/javascript'>/*<![CDATA[*/window.olark||(function(c){var f=window,d=document,l=f.location.protocol=="https:"?"https:":"http:",z=c.name,r="load";var nt=function(){
f[z]=function(){
(a.s=a.s||[]).push(arguments)};var a=f[z]._={
},q=c.methods.length;while(q--){(function(n){f[z][n]=function(){
f[z]("call",n,arguments)}})(c.methods[q])}a.l=c.loader;a.i=nt;a.p={
0:+new Date};a.P=function(u){
a.p[u]=new Date-a.p[0]};function s(){
a.P(r);f[z](r)}f.addEventListener?f.addEventListener(r,s,false):f.attachEvent("on"+r,s);var ld=function(){function p(hd){
hd="head";return["<",hd,"></",hd,"><",i,' onl' + 'oad="var d=',g,";d.getElementsByTagName('head')[0].",j,"(d.",h,"('script')).",k,"='",l,"//",a.l,"'",'"',"></",i,">"].join("")}var i="body",m=d[i];if(!m){
<!-- olark include code -->
<script id="olark_conversion_code">
olark('api.chat.onBeginConversation', function(event) {
if(!document.cookie.toString().match(/conversion_occured/) ){
document.cookie='conversion_occured=1';
// Do the conversion code here:
@LindsayElia
LindsayElia / gist:3354141
Created August 15, 2012 00:14
Disable page follow notifications permanently
<script type='text/javascript'>
olark.configure('give_location_to_operator', false)
</script>
@LindsayElia
LindsayElia / gist:3191210
Created July 28, 2012 00:36
Mobile Boot True Code for Mike
<!-- begin olark code --><script data-cfasync="false" type='text/javascript'>/*{literal}<![CDATA[*/
window.olark||(function(c){var f=window,d=document,l=f.location.protocol=="https:"?"https:":"http:",z=c.name,r="load";var nt=function(){f[z]=function(){(a.s=a.s||[]).push(arguments)};var a=f[z]._={},q=c.methods.length;while(q--){(function(n){f[z][n]=function(){f[z]("call",n,arguments)}})(c.methods[q])}a.l=c.loader;a.i=nt;a.p={0:+new Date};a.P=function(u){a.p[u]=new Date-a.p[0]};function s(){a.P(r);f[z](r)}f.addEventListener?f.addEventListener(r,s,false):f.attachEvent("on"+r,s);var ld=function(){function p(hd){hd="head";return["<",hd,"></",hd,"><",i,' onl' + 'oad="var d=',g,";d.getElementsByTagName('head')[0].",j,"(d.",h,"('script')).",k,"='",l,"//",a.l,"'",'"',"></",i,">"].join("")}var i="body",m=d[i];if(!m){return setTimeout(ld,100)}a.P(1);var j="appendChild",h="createElement",k="src",n=d[h]("div"),v=n[j](d[h](z)),b=d[h]("iframe"),g="document",e="domain",o;n.style.display="none";m.insertBefore(n,m.firstChild).
@LindsayElia
LindsayElia / gist:3154855
Created July 21, 2012 06:34
Olark Click to Chat buttons with Message Sent to Visitor
<!-- Code to paste around click to chat buttons: -->
<!-- BEGIN OLARK CHAT LINK, sample #1 -->
<div id='button1'>
<a href="javascript:void(0);" onclick="olark('api.box.expand')"><img src="button1.jpeg"></a>
</div>
<!-- END OLARK CHAT LINK -->
<!-- BEGIN OLARK CHAT LINK, sample #2 -->
<div id='button2'>
@LindsayElia
LindsayElia / gist:2961472
Last active October 6, 2015 07:57
Olark Rule "offer help to a visitor after they have spent x amount of time on site and if they are not a registered user"
<script type='text/javascript'>
//Enter conditions here to determine whether or not visitor is a registered user.
window.isRegisteredUser = false;
//Global variable to determine amount of time spent on site.
var SECONDS_SPENT_ON_SITE = 120;
olark('api.rules.defineRule', {