Skip to content

Instantly share code, notes, and snippets.

View LukvonStrom's full-sized avatar

Lukas LukvonStrom

View GitHub Profile
@LukvonStrom
LukvonStrom / body-min.json
Created June 12, 2020 20:47
Webhook to Websocket Proxy (useful to redirect HTTP Webhooks to devices behind a NAT i.e. Raspberry PIs) - expects at least the minimum JSON outlined in body-min.json as Body - additional attributes are of course addable
{
"secret": "test",
"service": "IFTTT",
"event": "button"
}
@LukvonStrom
LukvonStrom / chunk.js
Created December 31, 2018 16:20 — forked from dragonza/chunk.js
Chunk array
function chunk(array, size) {
if (!array) return [];
const firstChunk = array.slice(0, size); // create the first chunk of the given array
if (!firstChunk.length) {
return array; // this is the base case to terminal the recursive
}
return [firstChunk].concat(chunk(array.slice(size, array.length), size));
}
/*
MIT License
Copyright (c) 2013 Alex Ehrnschwender (http://alexehrnschwender.com/)
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
@LukvonStrom
LukvonStrom / keybase.md
Last active February 28, 2021 20:06
keybase.md

Keybase proof

I hereby claim:

  • I am lukvonstrom on github.
  • I am lukvonstrom (https://keybase.io/lukvonstrom) on keybase.
  • I have a public key ASAa_9tfl9nzcVU-eOz4OUfVsL3Hn271l6dJURCj_UjhBwo

To claim this, I am signing this object: