Skip to content

Instantly share code, notes, and snippets.

View naorzr's full-sized avatar
:octocat:
Whatever matters

naorzr

:octocat:
Whatever matters
View GitHub Profile
@unruthless
unruthless / gist:11383824
Last active January 3, 2024 08:57
HTML Email Template guidelines

General guidelines for designing HTML email templates.

Questions and comments welcome anytime – thanks for reading!

KEY TAKEAWAY:

  • Coding for HTML emails is like coding for Internet browsers from 10 years ago. (It’s the email clients’ — Outlook, etc. — fault.)
  • Picture a website from a decade ago: that’s the level of design complexity we can reasonably shoot for.

WIDTH:

@naorzr
naorzr / getAppRoot.ts
Last active April 23, 2020 11:35
Get application root in nodejs for windows and unix system
// Node version 12.0
// Typescript version 3.8
import fs from "fs";
import path from "path";
const getAppRoot = (curPath: string, rootIndicator = 'package.json'): string | Error=> {
if (curPath.length === 0 || curPath === path.sep) {
throw new Error(`Couldn't find root dir`)
} else if (fs.existsSync(path.join(curPath, rootIndicator))) {
return curPath