Skip to content

Instantly share code, notes, and snippets.

Avatar

Jonas Galvez galvez

View GitHub Profile
@WebReflection
WebReflection / esm-in-nodejs.md
Last active Jun 1, 2019
Solving the "ESM in NodeJS" Odyssey.
View esm-in-nodejs.md

Solving the "ESM in NodeJS" Odyssey.

After months of discussions in a dedicated group, it's clear to me NodeJS is still stuck in finding a way to deliver native ESM to its users.

The "usual few" won't hear anything different from .mjs, but .mjs has been demonstrated to be not a solution neither.

Following few cases not covered by .mjs:

  • evaluation of any string, via CLI, or on demand, where there is no extension
  • tools that convert their syntax into JS, since it always worked to date (thanks to transpilers, bundlers, and loaders)
@DreaMinder
DreaMinder / A Nuxt.js VPS production deployment.md
Last active Aug 4, 2020
Deployment manual for a real-world project built with nuxt.js + koa + nginx + pm2
View A Nuxt.js VPS production deployment.md

Example of deployment process which I use in my Nuxt.js projects. I usually have 3 components running per project: admin-panel SPA, nuxt.js renderer and JSON API.

This manual is relevant for VPS such as DigitalOcean.com or Vultr.com. It's easier to use things like Now for deployment but for most cases VPS gives more flexebillity needed for projects bigger than a landing page.

UPD: This manual now compatible with nuxt@2.3. For older versions deployment, see revision history.


Let's assume that you have entered fresh installation of Ubuntu instance via SSH. Let's rock:

@uriannrima
uriannrima / Description.vue.js
Last active Oct 9, 2019
Mixin factory to create components with it's own vuex store module.
View Description.vue.js
<template>
<div>
<div class="black-box rounded h-md-up">
<div>
<label>Description</label>
<minimize-button :minimize.sync="minimize"></minimize-button>
</div>
</div>
<div class="description-component" v-show="!minimize">
<div class="horizontal-container">
@pi0
pi0 / colors
Last active May 11, 2020
Super Simple Node.js String Colors Support
View colors
This snippets add super Simple Node.js String Colors Support.
See here:
http://stackoverflow.com/questions/32474241/node-js-terminal-color
http://stackoverflow.com/questions/9781218/how-to-change-node-jss-console-font-color
View ioslocaleidentifiers.csv
We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
mr Marathi
bs Bosnian
ee_TG Ewe (Togo)
ms Malay
kam_KE Kamba (Kenya)
mt Maltese
ha Hausa
es_HN Spanish (Honduras)
ml_IN Malayalam (India)
ro_MD Romanian (Moldova)
You can’t perform that action at this time.