Skip to content

Instantly share code, notes, and snippets.

Lukas van Driel lukasvan3l

Block or report user

Report or block lukasvan3l

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View 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 Apr 17, 2017
Fabric.js + Opentype.js for pixelperfect valentine cards
View rendercard.js
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 Apr 17, 2017
Fabric.js + Opentype.js for pixelperfect valentine cards
View loadfont.js
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 Jan 30, 2019
Any OAuth login service ever created, added to your app within 5 minutes
View blogpost_oauth_meteor_jimmy.md

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

View 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
You can’t perform that action at this time.