Skip to content

Instantly share code, notes, and snippets.

View maximum-pixels's full-sized avatar

Max Werner maximum-pixels

View GitHub Profile
@maximum-pixels
maximum-pixels / CloudFlare Worker RudderStack Proxy
Last active May 31, 2024 13:29
This is the index.js code for a CloudFlare worker to proxy RudderStack's JS SDK and Requests to make them Ad-Blocker Proof
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": "*",
@maximum-pixels
maximum-pixels / keybase.md
Created October 5, 2017 13:35
keybase proof

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 November 26, 2015 15:05
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
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)