Skip to content

Instantly share code, notes, and snippets.

Stephen Bannasch stepheneb

Block or report user

Report or block stepheneb

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@rlefevre
rlefevre / elm-linux-x64-static-0.19.1.md
Last active Dec 1, 2019
How to build an elm 0.19.1 binary statically linked to musl libc using docker
View elm-linux-x64-static-0.19.1.md

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 Jan 7, 2020
very simple javascript module dependency manager
View register-and-callback-when-available.js
// 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 Jan 8, 2020
JavaScript mixin patterns
View README.md

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 Apr 3, 2012
running md2d.js with d8 tracing
View 00-readme.md

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
View webgl-matrix-benchmarks-20110503.md
View using_rsync.sh
# 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/
View 01-building-openjdk.md

Building the BSD-port version of OpenJDK (Java 1.7) on Mac OS X

Take a look at the comments and code in update.sh.

$ source update.sh

I use update-usr-local.sh after a successful build to copy the new JVM into /usr/local.

I add pickjdk.sh into my ~/.bash_profile to allow easy switching between multiple JVMs.

View build-docs.sh
echo "
*** generate the documentation for sproutcore and open in a browser:
cd $SPROUTCORE_DEV/sproutcore-git
sc-docs sproutcore
open tmp/docs/sproutcore/index.html
"
cd $SPROUTCORE_DEV/sproutcore-git
View get-mdns.rb
#
# file get-mdns.rb
#
# Create a local git repository in mdns-responder-git of
# Apple's mDNSResponder open source implementation of zeroconf
#
# See: http://opensource.apple.com/source/mDNSResponder/
#
# Each mDNSResponder archive located here:
# http://www.opensource.apple.com/tarballs/mDNSResponder/
View jnlp_server.rb
require 'rubygems'
gem 'rack', '>= 1.1.0'
gem 'jnlp', '>= 0.6.2'
require 'rack'
require 'jnlp'
require 'fileutils'
require 'open-uri'
You can’t perform that action at this time.