Skip to content

Instantly share code, notes, and snippets.

View maximilian-lindsey's full-sized avatar

Maximilian Lindsey maximilian-lindsey

View GitHub Profile
maximilian-lindsey / duplicate.js
Created November 4, 2020 15:53
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('',''));
maximilian-lindsey / lazy-image-placeholder.html
Created April 8, 2019 11:56
Lazy loaded image placeholder
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" />
maximilian-lindsey /
Last active July 11, 2018 11:52
Docker stop and prune all
# stop all
docker stop $(docker ps -a -q)
# prune
docker system prune --all
# volume prune
docker volume prune
maximilian-lindsey /
Last active August 29, 2021 14:55
SQLite3 Electron windows integration

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 February 19, 2024 19:49
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 October 28, 2022 09:12
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