Skip to content

Instantly share code, notes, and snippets.

View drazisil's full-sized avatar
💭
Always Online - Somewhere

Molly Crendraven drazisil

💭
Always Online - Somewhere
View GitHub Profile
@khalidx
khalidx / node-typescript-esm.md
Last active May 8, 2024 07:58
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

@bramus
bramus / bookmarklet.md
Last active August 3, 2023 16:56
Mastodon User Page Bookmarklet
@jordaaash
jordaaash / .mocharc.json
Created October 25, 2021 01:18
Mocha + TypeScript + ESM
{
"extension": ["ts"],
"node-option": ["experimental-specifier-resolution=node", "loader=ts-node/esm"],
"spec": ["test/**/*.test.ts"]
}
@sindresorhus
sindresorhus / esm-package.md
Last active May 19, 2024 21:22
Pure ESM package

Pure ESM package

The package that linked you here is now pure ESM. It cannot be require()'d from CommonJS.

This means you have the following choices:

  1. Use ESM yourself. (preferred)
    Use import foo from 'foo' instead of const foo = require('foo') to import the package. You also need to put "type": "module" in your package.json and more. Follow the below guide.
  2. If the package is used in an async context, you could use await import(…) from CommonJS instead of require(…).
  3. Stay on the existing version of the package until you can move to ESM.
Ben Rudiak-Gould
unread,
Aug 13, 2001, 2:38:30 PM
to
I'm writing a utility which needs to support a third-party file format
which happens to use the PKWARE Data Compression Library for
compression. After discovering that no one knows how to decompress
this library's compressed format, I decided to try reverse-engineering
it. It turned out not to be too difficult.
A complete description of the format is below, for the edification of
@arigesher
arigesher / trigger_build.bash
Created May 22, 2019 18:42
CircleCI manual trigger
#!/bin/bash -e
# Usage:
#
# 1. set $CIRCLE_API_TOKEN
# 2. run `./trigger-build <account> <oroject> [<branch>]`
#
# For https://github.com/iambob/myfirstproject:
#
# trigger_build iambob myfirstproject
@lokst
lokst / config.yml
Last active April 18, 2019 13:21
Sample steps to manually update Xcode to latest 10.2 version (not necessary once the Xcode 10.2 GA version image has been released on CircleCI)
version: 2
jobs:
build:
macos:
xcode: "10.2.0"
steps:
- run:
name: Update Xcode to latest 10.2 version
command: |
# Requires setting the XCODE_INSTALL_USER and XCODE_INSTALL_PASSWORD
<template>
<p>{{ greeting }} World!</p>
</template>
<script>
module.exports = {
data: function () {
return {
greeting: 'Hello'
}
@noelbundick
noelbundick / LICENSE
Last active May 16, 2024 21:09
Exclude WSL installations from Windows Defender realtime protection
MIT License
Copyright (c) 2018 Noel Bundick
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
@mnem
mnem / man xccov
Last active October 4, 2021 12:10
xccov(1) xccov(1)
NAME
xccov - view Xcode coverage data in human-readable or machine-parseable format.
SYNOPSIS
xccov view [--only-targets | --files-for-target target_name | --functions-for-file name_or_path]