Skip to content

Instantly share code, notes, and snippets.

View stepheneb's full-sized avatar

Stephen Bannasch stepheneb

View GitHub Profile
@rlefevre
rlefevre / elm-linux-x64-static-0.19.1.md
Last active November 22, 2021 15:27
How to build an elm 0.19.1 binary statically linked to musl libc using docker

Elm 0.19.1 Linux x64 statically linked binary

This document describes how to build a statically linked binary of Elm 0.19.1 for Linux x64 using docker. The binary is built using Alpine Linux in order to easily link it statically to musl libc. This is how the official Elm 0.19.1 Linux binary is built.

Why?

Why build a statically linked binary?

Elm is currently distributed using npm. For Linux x64 (but this applies to any architecture), this requires to have a single x64 binary that works on all Linux x64 distributions. This is considerably easier to achieve by building a statically linked binary that will only depend on the Linux kernel ABI and System Call Interface but not on userpace libraries (see here for a compatibility survey of a dynamically built executable).

Why use docker?

@stepheneb
stepheneb / register-and-callback-when-available.js
Last active January 7, 2020 21:17
very simple javascript module dependency manager
// This simple module makes available a UUID generator created by Jeff Ward
//
// This module will be available under the global App.UUID
//
// After this module has completely loaded it registers itself so other modules that
// depend on it being present can wait until it is available to complete their startup.
**
* Fast UUID generator, RFC4122 version 4 compliant.
@stepheneb
stepheneb / README.md
Last active January 8, 2020 05:34
JavaScript mixin patterns

JavaScript mixin patterns

Four different ways JavaScript variables and closures can be used to implement different mix-in patterns.

Each implementation creates a mixin that creates property getter functions for model objects.

By model object I mean a function that takes properties (keys and values)( and returns an object that:

@stepheneb
stepheneb / 00-readme.md
Created April 3, 2012 04:15
running md2d.js with d8 tracing

Build v8 (creates the d8 executable):

git clone git://github.com/v8/v8.git v8-git
cd v8-git/
make dependencies
make native

If you don't have a copy of the lab repo download md2d.js from this gist:

curl https://raw.github.com/gist/2289269/md2d.js -o md2d.js

@stepheneb
stepheneb / README.md
Last active April 6, 2023 20:41
Simple 2D molecular simulation written in JavaScript

Simple Molecules

See this example live

About the Simple Molecules Model

You can select how many molecules to use and what the temperature should be.

About the Lennard-Jones potential graph

@stepheneb
stepheneb / index.html
Last active May 28, 2021 14:48
Trivially Simple Beam using D3.js
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<title>Simple Beam</title>
<script type="text/javascript" src="https://d3js.org/d3.v2.js"></script>
<script type="text/javascript" src="https://d3js.org/d3-geo.v2.js"></script>
<style type="text/css">
@stepheneb
stepheneb / README.md
Last active April 6, 2023 21:03
Canvas Animate Path Benchmark
@stepheneb
stepheneb / README.md
Last active May 28, 2021 14:39
SVG path benchmark (2012)

SVG Path Benchmark

Note: January 7, 2020

This benchmark was written in 2012 and the performance measurements below are valid for browsers at that time. The attribute path_seglist has been removed from the SCG element on Chrome and Firefox and this older benchmark no long runs on those systems.

The benchmark does still run on Safari and now has performance equivalent to the Canvas benchmark.

This example benchmarks the time taken to draw an SVG path with 10000 line segments.

# first recursive copy of external dir using rsync
$ rsync -avx --delete otto.concord.org:/web/xproject.dev.concord.org/current/public/system/attachments/ attachments
receiving file list ... done
created directory attachments
./
10/
10/original/
10/original/GenePool6.exe
13/