Skip to content

Instantly share code, notes, and snippets.

View rafpaf's full-sized avatar

Raphael Krut-Landau rafpaf

View GitHub Profile
@alexanderisora
alexanderisora / finishJson5.ts
Created May 11, 2023 15:28
function to complete an unfinished JSON.
export const finishJson5 = (unfinishedJson5: string) => {
let stack = [];
let inDoubleQuotes = false;
let inSingleQuotes = false;
let inSingleLineComment = false;
for (let i = 0; i < unfinishedJson5.length; i++) {
const currentChar = unfinishedJson5[i];
const nextChar = unfinishedJson5[i + 1];
let prevChar;
@vcavallo
vcavallo / explanation.md
Created June 14, 2018 19:30
remote dev VPS webpack-dev-server nginx setup

Remote Dev machine webpack-dev-server HMR + static serving combo

Make sure you have port 8080 (or whatever you use) open on the remote machine!! Don't be like Vinney.

I'm no webpack expert (in fact this is the first project I've set up by hand ever...), but if you know what you're doing you should be able to change the relevant parts of this to fit your project:

# webpack.config.js

module.exports = {