Skip to content

Instantly share code, notes, and snippets.

@circAssimilate
circAssimilate / Optimizely Poll For Delayed Content
Last active February 29, 2016 19:10
The pollForDelayedContent() helper function is an alternative solution to some of the approaches listed here: https://help.optimizely.com/hc/en-us/articles/200457495. Look below for more info.
/**
* OPTIMIZELY POLL FOR DELAYED CONTENT:
*
* The pollForDelayedContent() helper function is an alternative solution to some of the approaches listed here: https://help.optimizely.com/hc/en-us/articles/200457495.
* It will be able to be used as many times as it's needed within an experiment or variation. When the Optimizely snippet is implemented correctly, it should provide a way to eliminate all content flashing.
* The function allows for a an "options" element, to allow for more flexibility as well.
* Feel free to file a ticket at optimizely.com/support with any feedback or questions - as the comments on this page will not be responded to.
*
* SIMPLE USAGE EXAMPLE: this does not use the optional options object to specify selectorToHide, timeoutInSeconds, or intervalInMilliseconds, causing them to default to hide the no timeout and 50 milliseconds.
*
@jfloff
jfloff / mamp.md
Last active August 20, 2024 12:46
How to get MAMP to work with SSL ... Yes really.

First of all you need to be able to run MAMP in port 80. This is a "heat check" if you don't have any process jamming http ports. You can check it like this:

sudo lsof | grep LISTEN

If you do happen to have any process with something like this *:http (LISTEN), you are in trouble. Before with adventure check if it isn't MAMP itself (yeah, you should close that beforehand)

ps <pid of that process>

If you don't see MAMP, you are in good hands, I have just the thing for you: