Skip to content

Instantly share code, notes, and snippets.

View pirple-author's full-sized avatar

Pirple - Author pirple-author

View GitHub Profile
// Require FS
var fs = require('fs');
// Get the image
var imgBase64 = '/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAAUDBAgGBwgHBgcGBwcHBgcHBwcHBwcHBwcHBwcHBwcHBwcHChALBwgOCQcHDRUNDhERExMTBwsWGBYSGBASExIBBQUFCAcIDQgIDRINDQ0SEhISEhISEhISEhISEhISEhISEhISEhISEhISEhISEhISEhISEhISEhISEhISEhISEv/AABEIAtAFAAMBIgACEQEDEQH/xAAdAAAABwEBAQAAAAAAAAAAAAAAAQIDBAUGBwgJ/8QAbBAAAQMCAwQFBwQHDhAMBgIDAQACAwQRBRIhBjFBUQcTFCJhCBUycZGh8EJSgbEWI5XB0eHkFyQ2VWJzdHWUsrTU4/EJGCYzNENTVmNkcoKjs9LiJTVFVHaDhJOipLXTZYWSpcLDRMQ3RsX/xAAbAQADAQEBAQEAAAAAAAAAAAAAAQIDBAUGB//EADoRAQEAAgEDBAECBAUCBQMFAAABAhEDBBIhBRMxUUEUIgYyYXEVgaGx8JHBI0JS0eEHYnIWM0OS8f/aAAwDAQACEQMRAD8AmAIilJJXiR6AJCWiTUTJuTTkuQptxVQG3phxTzymHlUVNPKYKdcmSpIgqFXHRTSoOJDuKvkM3iUuVVpqgnsZ9JVlitmdHO/MFDaFKITRXn88dGCXQbwtJRnRZjDzqFo6A5h9C8nqMXocPwnAoroNRLza7YO6MFJSkqKCF0ERKRF5kMyRdC6FHA5HnTQKJAOlyTdJBR3QcLugCiCNKqhV0iRGicESnWexf5X0rMPeLrTYx8pY+t3kNX0fp18PF6uJjZQldaFUtulXXsbeXpZmYJDpwq7MUohG1SJMjgmHkaJFk29hTlPR4gNAypcUeZRj9KvsBps/DRZ8vJ2xfHju6RI6N1u6p2H0jrjQrV0OGiw0FlPocNDjuC8zk6ju8R6fH0+vKFhUBs
@pirple-author
pirple-author / index.js
Created October 13, 2018 07:53
Vikram's Lib.Create debugging
var fs = require('fs');
var path = require('path');
var lib = {};
lib.baseDir = path.join(__dirname,'/../data/');
lib.create = function(dir, file, data, callback){
var fileName = lib.baseDir+dir+'/'+file+'.json';
@pirple-author
pirple-author / prereqs.md
Last active October 28, 2018 05:06
The Node.js Master Class - Prerequisites Test

The Node.js Master Class - Prerequisites Test

If you ace this 10-question quiz, you'll get 50% off your enrollment in the Node.js Master Class

Follow these instructions CAREFULLY

Instructions: Start with an empty string. As you answer each question, add the letter of that answer onto that string. You will end up with a 10-character string that looks something like this: ABCDABCDAB. This string is your coupon code. Use it on the site when completing your purchase of the course. The final checkout screen contains a coupon field, above the credit-card entry field. Paste the string in there. If you end up with the wrong string (because one of your answers is wrong), the coupon won't work at all. If you get stuck and can't figure out which answer is wrong, read the answer-explanations at the bottom of this gist.

Note: I rearrange the answers to the questions often. So the coupon code you retrieve here may only work for a few hour