Skip to content

Instantly share code, notes, and snippets.

View jessestricker's full-sized avatar

Jesse Stricker jessestricker

  • Hamburg, Germany
  • 19:41 (UTC +02:00)
View GitHub Profile
@repi
repi / crate-health.md
Last active February 22, 2024 01:17
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 May 24, 2024 02:36
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.
# this file contains keys needed for decryption of file system data (WUD/WUX)
# 1 key per line, any text after a '#' character is considered a comment
# the emulator will automatically pick the right key
541b9889519b27d363cd21604b97c67a # example key (can be deleted)
d7b00402659ba2abd2cb0db27fa2b656 # Common
805e6285cd487de0faffaa65a6985e17 # Espresso Ancast
b5d8ab06ed7f6cfc529f2ce1b4ea32fd # Starbuck Ancast
9a164ee15ac7ceb64d3cc130094095f6 # 007 Legends [EUR, NUS]
@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 May 22, 2024 23:03
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 December 16, 2023 01:38
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