Skip to content

Instantly share code, notes, and snippets.

View seanjensengrey's full-sized avatar

Sean Jensen-Grey seanjensengrey

View GitHub Profile

$java -XX:+PrintFlagsFinal -version

[Global flags]
ccstrlist AOTLibrary                               =                                          {product} {default}
      int ActiveProcessorCount                     = -1                                       {product} {default}
    uintx AdaptiveSizeDecrementScaleFactor         = 4                                        {product} {default}
    uintx AdaptiveSizeMajorGCDecayTimeScale        = 10                                       {product} {default}
    uintx AdaptiveSizePolicyCollectionCostMargin   = 50                                       {product} {default}
    uintx AdaptiveSizePolicyInitializingSteps      = 20                                       {product} {default}
@seanjensengrey
seanjensengrey / centos_7_kerl.md
Created August 3, 2016 18:32
centos erlang build using kerl
curl -O https://raw.githubusercontent.com/kerl/kerl/master/kerl
chmod +x kerl

sudo yum install gcc gcc-c++ glibc-devel make ncurses-devel openssl-devel autoconf java-1.8.0-openjdk-devel git
sudo yum install pam-devel
sudo yum install perl-Digest-SHA-5.85-3.el7.x86_64


CFLAGS="-DOPENSSL_NO_EC=1" ./kerl build git https://github.com/basho/otp OTP_R16B02_basho10 R16B02-basho10
@seanjensengrey
seanjensengrey / settings.json
Created May 5, 2018 17:16
vscode settings override
{
"workbench.colorCustomizations": {
"contrastActiveBorder": "#c210bc",
"input.border": "#FE2EF7",
"selection.background": "#58FAF4",
"editor.selectionBackground": "#58FAF4",
"widget.shadow": "#76e67b",
"editor.lineHighlightBorder": "#ff0000"
},
"editor.wrappingIndent": "indent",
==> Caveats
OPAM uses ~/.opam by default for its package database, so you need to
initialize it first by running (as a normal user):
$ opam init
Run the following to initialize your environment variables:
$ eval `opam config env`
@seanjensengrey
seanjensengrey / redrotate.rs
Created April 9, 2018 05:01
kiss3d rotating cubes
extern crate kiss3d;
extern crate nalgebra as na;
use na::{Vector3, UnitQuaternion};
use kiss3d::window::Window;
use kiss3d::light::Light;
fn main() {
let mut window = Window::new("Kiss3d: cube");
let mut c = window.add_cube(1.0, 1.0, 1.0);
@seanjensengrey
seanjensengrey / build.sh
Created April 4, 2018 18:17
wrk2 in a docker container
#!/bin/bash
set -x
mkdir build-temp
pushd build-temp
git clone https://github.com/giltene/wrk2
docker run --rm -v $PWD/wrk2:/wrk2 sjg/builder:v1 /bin/bash -c 'cd wrk2; make'
popd
docker build -t sjg/wrk2:v2 .
Bootstrapping a simple compiler from nothing
============================================
This document describes how I implemented a tiny compiler for a toy
programming language somewhat reminiscent of C and Forth. The funny
bit is that I implemented the compiler in the language itself without
directly using any previously existing software. So I started by
writing raw machine code in hexadecimal and then, through a series of
bootstrapping steps, gradually made programming easier for myself
while implementing better and better "languages".
/*
* Copyright (C) 2006 Edmund GRIMLEY EVANS <edmundo@rano.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
polygon(points=[
[0,0],
[0,-1.64],
[2.66,-4.3],
[8.26,-4.3],
[11,-1.64],
[11,0]
]);