Skip to content

Instantly share code, notes, and snippets.

View tab58's full-sized avatar
😎
Making the world a weirder place.

Tim Bright tab58

😎
Making the world a weirder place.
  • Provo, UT
View GitHub Profile
@tab58
tab58 / bash.md
Last active April 26, 2020 19:48
Bash Cheat Sheet

Bash Cheat Sheet

Common Bash Program Operations

sed: Replace string occurrences with another string.

sed 's/hello/world/' input.txt > output.txt
tims-mbp:summation-algorithms Tim$ node --trace-opt --trace-deopt --allow-natives-syntax --code-comments trace.js
[deoptimize global object @ 0x1544000106e9]
[marking 0x1544000b40c9 <JS Function $Array.configurable_ (SharedFunctionInfo 0x15440001bd81)> for recompilation, reason: small function, ICs with typeinfo: 1/1 (100%), generic ICs: 0/1 (0%)]
[optimizing 0x1544000b40c9 <JS Function $Array.configurable_ (SharedFunctionInfo 0x15440001bd81)> - took 0.052, 0.048, 0.044 ms]
[marking 0x1544000b3ff1 <JS Function (SharedFunctionInfo 0x15440001c171)> for recompilation, reason: small function, ICs with typeinfo: 2/2 (100%), generic ICs: 0/2 (0%)]
[optimizing 0x1544000b3ff1 <JS Function (SharedFunctionInfo 0x15440001c171)> - took 0.021, 0.046, 0.044 ms]
[marking 0x15440001cd81 <JS Function PropertyDescriptor (SharedFunctionInfo 0x154400018631)> for recompilation, reason: small function, ICs with typeinfo: 12/12 (100%), generic ICs: 0/12 (0%)]
[optimizing 0x15440001cd81 <JS Function PropertyDescriptor (SharedFunctio
var Benchmark = require('benchmark');
var ndarray = require('ndarray');
var sums = require('./numeric-sums.js');
// var mean = 2;
var k = 0.1;
var mag = 100000;
function randomVector (n) {
var v = new Float64Array(n);
var i = n;