Skip to content

Instantly share code, notes, and snippets.

View jwerle's full-sized avatar
🔨
Working on @socketsupply/socket

Joseph Werle jwerle

🔨
Working on @socketsupply/socket
View GitHub Profile
[1]+ Stopped vim compile_flags.txt
[meta]
name = "realm-cpp-test"
version = "1.0.0"
description = ""
[meta.bundle]
identifier = co.socketsupply.realm-cpp-test
[build]
function throwsWithoutAwait () {
return asyncError('throwsWithoutAwait')
}
async function throwsWithAwait () {
return await asyncError('throwsWithAwait')
}
async function asyncError (message) {
await sleep(250)
#!/usr/bin/env bash
declare -a tags=($(git tag -l))
for tag in "${tags[@]}"; do
## checkout current tag
git checkout "$tag"
## checkout `setup.sh` from master branch with latest changes
git checkout master -- setup.sh
## get current version

Keybase proof

I hereby claim:

  • I am jwerle on github.
  • I am jwerle (https://keybase.io/jwerle) on keybase.
  • I have a public key ASBIJmzjNIBim5qlKLmnjKgthn1V7kzVsj0G_oXkXb7P3Ao

To claim this, I am signing this object:

@jwerle
jwerle / .gitignore
Last active March 15, 2019 00:48
compile javascript and encrypt into native module - blah
node_modules/
package-lock.json
plugin.c
plugin.node
josephwerle@werle:~/repos/termite$ sudo dmidecode -t 17 | grep "Size.*MB" | awk '{s+=$2} END {print s / 1024}'
4
josephwerle@werle:~/repos/termite$ awk '/MemTotal/ {print $2}' /proc/meminfo
3955724
josephwerle@werle:~/repos/termite$ free -g
total used free shared buff/cache available
Mem: 3 2 0 0 0 0
Swap: 8 0 7
const mirrorFolder = require('mirror-folder')
const { keyPair } = require('hypercore/lib/crypto')
const hyperdrive = require('hyperdrive')
const assert = require('assert')
const pify = require('pify')
const ram = require('random-access-memory')
const seed = Buffer(32).fill('hello')
const { publicKey, secretKey } = keyPair(seed)
const a = hyperdrive(ram, publicKey, {sparse: false, sparseMetadata: false, secretKey})
@jwerle
jwerle / index.js
Created August 23, 2017 16:58
requirebin sketch
const regl = require('regl')({
extensions: ['OES_texture_float'],
optionalExtensions: ['oes_texture_float_linear']
})
const framebuffer = regl.framebuffer({colorType: 'float', colorFormat: 'rgba'})
const framebufferCommand = regl({framebuffer})
let draw = regl({
@jwerle
jwerle / index.js
Last active August 18, 2017 20:24
requirebin sketch
const { Material } = require('axis3d/material')
const { Context } = require('axis3d/core')
const { Frame } = require('axis3d/frame')
const { Mesh } = require('axis3d/mesh')
//const { TorusGeometry } = require('axis3d-geometry')
const ctx = new Context()
@jwerle
jwerle / index.js
Last active July 7, 2017 17:33
requirebin sketch
// Welcome! require() some modules from npm (like you were using browserify)
// and then hit Run Code to run your code on the right side.
// Modules get downloaded from browserify-cdn and bundled in your browser.
const regl = require('regl')()
const draw = regl({
vert:`
precision mediump float;
attribute vec3 position;
void main() {
gl_Position = vec4(position, 1.0);