Skip to content

Instantly share code, notes, and snippets.

View PepijnSenders's full-sized avatar
🍇

Pepijn Senders PepijnSenders

🍇
View GitHub Profile
@PepijnSenders
PepijnSenders / hacky_listener.js
Created February 8, 2023 17:05
Making nextjs worker compatible with cloudflare
addEventListener("fetch", (event)=> {
const nextResponse = middleware(event.request)[Symbol.for('edge-runtime.inspect.custom')]();
event.respondWith(new Response(nextResponse.body, nextResponse));
});

Keybase proof

I hereby claim:

  • I am pepijnsenders on github.
  • I am debakkerszoon (https://keybase.io/debakkerszoon) on keybase.
  • I have a public key ASD2S4VqypWiZTPhoFD7F2qWZXU-0WIC7w9SbqAAjUdpvAo

To claim this, I am signing this object:

@PepijnSenders
PepijnSenders / move-files.js
Last active April 2, 2019 08:47
Move test files to be next to the actual files.
/**
* USAGE:
* node move-files.js
*
* If you have a different path for your unit tests you can add an environment variable like so:
* TEST_FOLDER_NAME="__tests__/unit" node move-file.js
*/
const fs = require('fs');
const path = require('path');
@PepijnSenders
PepijnSenders / removeSystemAttributes.js
Last active March 21, 2019 11:43
Remove sys properties from contentful API
describe('contentful', () => {
const removeSystemAttributes = data => {
if (typeof data === 'object' && !data.fields) {
const { sys, ...cleanedObject } = data;
return cleanedObject;
}

coffeeshops

  • Dampkring (Handboogstraat 29) (Where they shot Ocean's eleven or twelve)
  • Boerejongens (Baarsjesweg 239) (By far the best you'll ever find, they have their own medical brand)

cafes & restaurants & parties

@PepijnSenders
PepijnSenders / gist:6727051
Last active December 24, 2015 01:59
~/.bash_profile
## Git aliases
alias ga='git add'
alias gc='git commit -m '
alias gac='git add -A && git commit -m '
alias gb='git branch'
alias gco='git checkout'
alias gst='git status'
alias gd='git diff'
alias gps='git push'