Skip to content

Instantly share code, notes, and snippets.

//npm init -y
//npm install --save puppeteer
//usage: node script.js /path/to/input.html /path/to/output.pdf
//script.js
const puppeteer = require('puppeteer');
(async () => {
/**
* Marlin 3D Printer Firmware
* Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
@zoutepopcorn
zoutepopcorn / atom
Created October 31, 2017 11:36
atom packages
// Install default settings
apm i atom-beautify file-icons platform-ide-terminal tool-bar
//nano /boot/cmdline.txt -> verander console
//const NR = "0600000000";
const SerialPort = require('serialport');
const Readline = SerialPort.parsers.Readline;
const port = new SerialPort('/dev/serial0', {
baudRate: 115200
});
const parser = port.pipe(new Readline({ delimiter: '\n' }));
Store.Presence.find( '[email protected]').then(function(d){
// kopie van json out
console.log(d);
});
let out;
Store.Wap.statusFind( '[email protected]').then(function(d){
console.log(d);
var express = require('express'),
http = require('http');
var app = express();
var server = http.createServer(app);
var io = require('socket.io').listen(server);
const puppeteer = require('puppeteer');
const URL = "https://web.whatsapp.com";
let browser;
let page;
var fs = require('fs');
var md5 = require('md5');
var dir = __dirname + "\\uploads";
console.log(dir);
var test = "hi there";
fs.readdir(dir, function(err, items) {
console.log(test);
@zoutepopcorn
zoutepopcorn / pi
Last active December 5, 2017 08:58
# Windows
Putty
http://www.putty.org/
# Burn image on SD card
https://etcher.io/
https://www.raspberrypi.org/downloads/raspbian/
@zoutepopcorn
zoutepopcorn / Node.js
Created August 10, 2017 15:36
Node.js
const fs = require('fs');
const download = require('download');
const htmlparser = require("htmlparser2");
const get = require('simple-get');
const pUrl = require('parse-url');
const url = process.argv[2];
const pu = pUrl(url);
const fsPath = require('fs-path');
let base = `${pu.protocol}://${pu.resource}` ;
import wifi
wifi.init()
woezel.install('zzz')