Skip to content

Instantly share code, notes, and snippets.

View lukasvan3l's full-sized avatar

Lukas van Driel lukasvan3l

View GitHub Profile
@lukasvan3l
lukasvan3l / keybase.md
Created August 9, 2019 13:53
keybase.md

Keybase proof

I hereby claim:

  • I am lukasvan3l on github.
  • I am lukasvan3l (https://keybase.io/lukasvan3l) on keybase.
  • I have a public key ASCx3qjlIqZtOcLK3q0y5WriAS6dRyOLMg0Q4eN2ISlC6Ao

To claim this, I am signing this object:

@lukasvan3l
lukasvan3l / rendercard.js
Created April 17, 2017 06:33
Fabric.js + Opentype.js for pixelperfect valentine cards
const canvas = fabric.createCanvasForNode(width, height);
canvas.contextCache.constructor.prototype.getFontSize = function getFontSize() {
return 1 * this.font.split('-')[1];
};
canvas.contextCache.constructor.prototype.getFontFamily = function getFontFamily() {
return this.font.split('-')[0]
};
@lukasvan3l
lukasvan3l / loadfont.js
Last active April 17, 2017 06:32
Fabric.js + Opentype.js for pixelperfect valentine cards
function downloadAndLoadFont(id, url) {
https.get(url, (res) => {
var data = [];
res.on('data', function(chunk) {
data.push(chunk);
}).on('end', function() {
var buffer = Buffer.concat(data);
fonts[id] = opentype.parse(toArrayBuffer(buffer));
console.log('loaded font ' + id);
});
@lukasvan3l
lukasvan3l / blogpost_oauth_meteor_jimmy.md
Last active August 5, 2022 07:50
Any OAuth login service ever created, added to your app within 5 minutes

Adding any OAuth login to your Meteor app

tl;dr: Copy the q42:accounts-microsoft and q42:microsoft package, modify the URLs and service name and it works! Probably anyway...

When creating a commercial application with a wide target audience, you can stumble upon users wanting to login using an unknown and barely used OAuth service. And why deny your users this when you can easily create a login service package?

With only about 400 million active users and only 2nd place as world most valuable brand it makes sense that no developer has created an implementation to log in with your Microsoft account. But believe it or not, some people like logging in with their Microsoft Account. And so, by building on the the default meteor google and [accounts-google](https://atmospherejs.com/me

@lukasvan3l
lukasvan3l / es.sh
Last active December 14, 2015 16:39 — forked from michielpost/es.sh
cd ~
sudo yum update
sudo yum install java-1.7.0-openjdk -y
wget http://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-0.90.0.Beta1.tar.gz -O elasticsearch.tar.gz
tar -xf elasticsearch.tar.gz
rm elasticsearch.tar.gz
mv elasticsearch-* elasticsearch
sudo mv elasticsearch /usr/local/share