Skip to content

Instantly share code, notes, and snippets.


Maximilian Lindsey maximilian-lindsey

View GitHub Profile
maximilian-lindsey / duplicate.js
Created Nov 4, 2020
Duplicate content with JS
View duplicate.js
const fs = require('fs-extra');
const glob = require('glob');
const promisify = require('util.promisify');
const globAsync = promisify(glob);
const getAllFiles = async () => {
const allFiles = await globAsync('../content/**/*');
for (const file of allFiles) {
await fs.copy(file, file.replace('',''));
View lazy-image-placeholder.html
<!-- Source: -->
<img src="data:image/svg+xml;charset=utf-8,
<svg xmlns=' '
width='1280' height='720' />"
alt="A lazy Jpeg" />
# stop all
docker stop $(docker ps -a -q)
# prune
docker system prune --all
# volume prune
docker volume prune

SQLite3 Electron windows integration

This guide is based on the very informative discussion in this article: Using node_sqlite3 with Electron

Install sqlite3

npm install sqlite3 --save
maximilian-lindsey /
Last active Nov 5, 2022
How to run Express inside an Electron app

How to run Express inside an Electron app

You can run your Express app very easily inside your Electron app.

All you need to do is to:

  • place all the files of your Express app inside a new app folder in your_electron_app\resources\app
  • reconfigure the app.js file
  • refactor some relative pathes in your Express app
maximilian-lindsey /
Last active Oct 28, 2022
Node.js and Serialport on Windows 7 to connect your Ardunio or other cool devices

Node.js and serialport with Windows 7

This is a short example how to get the Node.js package serialport up and running with Windows 7 (this should also work for higher versions of Windows, but I didn't test that).

By using this package, you will be able to send and receive data to and from the serial port of your Arduino or any other device, using this port.


As of September 16, 2015, serialport does not compile using Node.js version: v4.0.0