Skip to content

Instantly share code, notes, and snippets.

View tengla's full-sized avatar

Thomas Eng tengla

  • Oslo, Norway
View GitHub Profile
@khalidx
khalidx / node-typescript-esm.md
Last active April 15, 2025 14:15
A Node + TypeScript + ts-node + ESM experience that works.

The experience of using Node.JS with TypeScript, ts-node, and ESM is horrible.

There are countless guides of how to integrate them, but none of them seem to work.

Here's what worked for me.

Just add the following files and run npm run dev. You'll be good to go!

package.json

@tengla
tengla / clock.js
Created November 13, 2018 22:10
An analog clock in React.
import React, { Component } from 'react';
const style = {
container: {
position: 'relative',
height: '420px',
width: '420px',
margin: '0 auto',
border: '1px solid #aaa'
},
@jjuarez
jjuarez / nginx_control_script.sh
Created May 19, 2010 22:01
nginx service script
#!/bin/sh
NGINX_BASE_DIR="/opt/nginx"
NGINX_DAEMON="${NGINX_BASE_DIR}/sbin/nginx"
NGINX_CONF="${NGINX_BASE_DIR}/conf/nginx.conf"
__launch_signal( ) {
${NGINX_DAEMON} -s ${1} &>/dev/null
}