I hereby claim:
- I am conundrumer on github.
- I am delu (https://keybase.io/delu) on keybase.
- I have a public key whose fingerprint is 48AA B300 E48D 75A1 49AE 5805 00B6 5AB6 8C2E CFC2
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
// i suppose i should put this somewhere before accidentally losing it | |
// need to update lr-core to have file import/export so this can work depending only on that and lodash and yargs | |
'use strict' | |
let path = require('path') | |
let fs = require('fs') | |
let _ = require('lodash') | |
let argv = require('yargs') | |
.usage('usage: node combiner.js output.track.json') | |
.option(0, { |
[ | |
{ | |
"title": "Magaz Stinged", | |
"artist": "Funckarma", | |
"station": "Klik Me Radio" | |
}, | |
{ | |
"title": "Rare & Pelentiful", | |
"artist": "Tipper", | |
"station": "Klik Me Radio" |
fn fib(n: u64) -> u64 { | |
match n { | |
0 => 1, | |
1 => 1, | |
_ => fib(n - 1) + fib(n - 2) | |
} | |
} | |
fn fib_fast(n: u64) -> u64 { | |
let mut seen = vec![None; 1 + n as usize]; |
import track from 'lr/track' | |
import ui from 'lr/ui' | |
import tools from 'lr/tools' | |
import React from 'react' | |
module.info = { | |
name: 'Fill Tool', | |
version: '0.1.0', | |
author: 'David Lu' | |
} |
let decompress = require('lz-string').decompressFromBase64 | |
const linesArrayAttr = ['type', 'id', 'x1', 'y1', 'x2', 'y2', 'extended', 'flipped', 'leftLine', 'rightLine'] | |
function validateJson ({version, startPosition, lines}) { | |
if (!(version === '6.2' || version === '6.1')) { | |
throw new Error(`This track does not have a valid version: ${version}`) | |
} | |
if (!( | |
startPosition instanceof Object && |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<style type="text/css"> | |
html, body { | |
width: 100%; | |
height: 100%; | |
} | |
</style> |
/* | |
* float.js | |
* fromHex: takes a 64-bit number encoded as a hex string (eg 34F5CA0157FF00FF) | |
* and returns a float whose binary representation is this number | |
* toHex: takes a number and returns the binary encoding as a hex string | |
*/ | |
/*eslint-env node */ | |
'use strict'; |
import React from 'react' | |
import Vector from 'core/Vector' | |
function angleTo (u, v) { | |
return Math.atan2(u.cross(v), u.dot(v)) | |
} | |
export default function Speedometer ({rider, prevRider, toolbarsOpen}) { | |
let style = {position: 'absolute', top: toolbarsOpen ? 40 : 0, right: 0, padding: 8, textAlign: 'right', fontFamily: 'monospace', backgroundColor: 'rgba(255,255,255,0.8)'} | |
let avgPos = rider.points.reduce((acc, {pos}) => acc.add(pos), new Vector(0, 0)).divS(rider.points.length) |