Skip to content

Instantly share code, notes, and snippets.

Avatar

Max Werner maximum-pixels

View GitHub Profile
@maximum-pixels
maximum-pixels / CloudFlare Worker RudderStack Proxy
Last active Aug 25, 2021
This is the index.js code for a CloudFlare worker to proxy RudderStack's JS SDK and Requests to make them Ad-Blocker Proof
View CloudFlare Worker RudderStack Proxy
addEventListener('fetch', event => {
if(event.request.method === 'OPTIONS'){
event.respondWith(handleOptions(event.request))
}else{
event.respondWith(handleRequest(event.request))
}
})
const corsHeaders = {
"Access-Control-Allow-Origin": "*",
View keybase.md

Keybase proof

I hereby claim:

  • I am maxfwerner on github.
  • I am maxfswerner (https://keybase.io/maxfswerner) on keybase.
  • I have a public key ASBAow_ewVJzrkTeJIy5axB_RUwbm9MkgXpgwgFQHpkzhAo

To claim this, I am signing this object:

@maximum-pixels
maximum-pixels / paginate_helper.rb
Created Nov 26, 2015
This is a custom link renderer that will format the pagination bar with Bootstrap4 as well as AJAX (i.e. data-remote="true") to use jquery-ujs rails
View paginate_helper.rb
module PaginateHelper
class PaginateJSLinkRenderer < WillPaginate::ActionView::LinkRenderer
def prepare(collection, options, template)
options[:params] ||= {}
options[:params]['_'] = nil
super(collection, options, template)
end
protected
def html_container(html)