Skip to content

Instantly share code, notes, and snippets.

View davidDuymelinck's full-sized avatar

davidDuymelinck

View GitHub Profile
@davidDuymelinck
davidDuymelinck / ghostery_hubspot_message.js
Last active June 6, 2018 09:22 — forked from adrianspeyer/ghostery_hubspot_message.js
How to handle Ghostery blocking your HubSpot forms. This appends a message asking user to add your site to whitelist. Just add it to the footer in any HubSpot COS page.
$(window).load(function () {
if($('.hs_cos_wrapper_type_form input[type="text"]').length === 0) {
var lang = $('html').attr('lang');
var msg = 'If you are seeing this message you may have Adblock or Ghostery enabled. Please consider enabling Hubspot forms.';
switch(lang) {
case 'nl':
case 'nl-be':
msg = 'Als je deze booschap ziet heb je waarschijnlijk Adblock of Ghostery. Gelieve Hubspot forms toe te laten.';
break;

The introduction to Reactive Programming you've been missing

(by @andrestaltz)

So you're curious in learning this new thing called (Functional) Reactive Programming (FRP).

Learning it is hard, even harder by the lack of good material. When I started, I tried looking for tutorials. I found only a handful of practical guides, but they just scratched the surface and never tackled the challenge of building the whole architecture around it. Library documentations often don't help when you're trying to understand some function. I mean, honestly, look at this:

Rx.Observable.prototype.flatMapLatest(selector, [thisArg])

Projects each element of an observable sequence into a new sequence of observable sequences by incorporating the element's index and then transforms an observable sequence of observable sequences into an observable sequence producing values only from the most recent observable sequence.