Skip to content

Instantly share code, notes, and snippets.

View jessestricker's full-sized avatar
:shipit:
do it

Jesse Stricker jessestricker

:shipit:
do it
  • 09:34 (UTC +02:00)
View GitHub Profile
@repi
repi / crate-health.md
Last active July 30, 2024 17:22
Guidelines on evaluating health & quality of third-party crates at Embark

What to evaluate and consider before adding usage of new third-party crates.

These are not exact requirements but questions to investigate and discuss to help reason around the health, safety, maintainability, and more around crates.

This can also be read as an opinionated guide for crate authors of what our (Embark's) guidelines and recommendations are, though should not be taken too literally.

Legend: 🔒 Must have, ⭐️ Should have, 👍 Nice to have, ℹ️ Info

@sindresorhus
sindresorhus / esm-package.md
Last active April 14, 2025 15:55
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.
@jessestricker
jessestricker / OpenSimplexNoise.cpp
Created July 13, 2016 18:41
[C++] OpenSimplexNoise
#include "OpenSimplexNoise.hpp"
#include <cmath> // sqrt
#include <numeric> // std::iota
#include <algorithm> // std::shuffle
const OpenSimplexNoise::value_t
OpenSimplexNoise::STRETCH_CONST = (sqrt(3) - 3) / 6,
OpenSimplexNoise::SQUISH_CONST = (sqrt(3) - 1) / 2;
const std::array<OpenSimplexNoise::gradient, 8> OpenSimplexNoise::GRADIENTS =
@jessestricker
jessestricker / enum.cs
Last active April 20, 2016 19:42
[C#] A generic util class for enums.
using System;
using System.Collections.Generic;
using System.Linq;
public static class Enum<T> where T : struct
{
public static IEnumerable<EnumValue<T>> Values =>
from object value in Enum.GetValues(typeof(T))
select new EnumValue<T>((T)value);
@KdotJPG
KdotJPG / OpenSimplex2S.java
Last active April 2, 2025 15:44
Visually isotropic coherent noise algorithm based on alternate constructions of the A* lattice.
/**
* K.jpg's OpenSimplex 2, smooth variant ("SuperSimplex")
*
* More language ports, as well as legacy 2014 OpenSimplex, can be found here:
* https://github.com/KdotJPG/OpenSimplex2
*/
public class OpenSimplex2S {
private static final long PRIME_X = 0x5205402B9270C86FL;
@damphat
damphat / apt-rdepends-tree
Last active April 1, 2025 18:24
debian dependency tree
#! /bin/bash
# Description: show dependency tree
# Author: damphat
if [ $# != 1 ]; then
echo 'Usage: apt-rdepends-tree <package>'
echo 'Required packages: apt-rdepends'
exit 1
fi