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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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'; |