Skip to content

Instantly share code, notes, and snippets.

0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'run', 'test' ]
2 info using npm@3.10.8
3 info using node@v6.8.1
4 verbose run-script [ 'pretest', 'test', 'posttest' ]
5 info lifecycle react-redux-starter-kit@3.0.0-alpha.2~pretest: react-redux-starter-kit@3.0.0-alpha.2
6 silly lifecycle react-redux-starter-kit@3.0.0-alpha.2~pretest: no script for pretest, continuing
7 info lifecycle react-redux-starter-kit@3.0.0-alpha.2~test: react-redux-starter-kit@3.0.0-alpha.2
8 verbose lifecycle react-redux-starter-kit@3.0.0-alpha.2~test: unsafe-perm in lifecycle true
9 verbose lifecycle react-redux-starter-kit@3.0.0-alpha.2~test: PATH: /usr/local/lib/node_modules/npm/bin/node-gyp-bin:/home/jz/realestate-client/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
mkdir snapshot-env
virtualenv snapshot-env/
cd snapshot-env/
source bin/activate
pip install nodeenv
nodeenv --node=4.2.6 --prebuilt node/
deactivate
git clone https://github.com/prerender/prerender.git
source node/bin/activate
cd prerender
@amergin
amergin / .env
Last active June 25, 2016 18:36
export PORT=35292
export PRERENDER_SERVICE_URL='http://localhost:35292/'
export PHANTOMJS_PORT=35294
export PHANTOM_CLUSTER_NUM_WORKERS=5
export PHANTOM_WORKER_ITERATIONS=10
export CACHE_ROOT_DIR="~/snapshot-env/prerender/filecache/"
export CACHE_LIVE_TIME=7200
PHANTOM_CLUSTER_MESSAGE_TIMEOUT=800
export LANGUAGE=en_US.UTF-8
export LANG=en_US.UTF-8
#!/usr/bin/env node
var prerender = require('./lib');
var server = prerender({
workers: process.env.PHANTOM_CLUSTER_NUM_WORKERS,
iterations: process.env.PHANTOM_WORKER_ITERATIONS,
logRequests: true
});
@amergin
amergin / npm install.log
Created May 25, 2016 05:40
Issue with setting up prerender
(snapshot-env)jz@lakka:~/snapshot-env/prerender$ rm -rf node_modules/
(snapshot-env)jz@lakka:~/snapshot-env/prerender$ npm install
npm WARN deprecated jade@0.26.3: Jade has been renamed to pug, please install the latest version of pug instead of jade
npm WARN deprecated graceful-fs@2.0.3: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-fs@^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree.
> phantomjs-prebuilt@2.1.7 install /home/users/jz/snapshot-env/prerender/node_modules/phantomjs-prebuilt
> node install.js
PhantomJS not found on PATH
Download already available at /tmp/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2
@amergin
amergin / output.txt
Last active August 29, 2015 14:26
Math.js regression performance problem, code
_xMatrixTransp size = 2,4084
_xMatrix size = 4084
_normalTargetData size = 4084
@amergin
amergin / grid-config.js
Last active August 29, 2015 14:25
Overlapping grid windows, angular-gridster
$scope.itemMapper = {
sizeX: 'window.grid.size.x',
sizeY: 'window.grid.size.y',
row: 'window.grid.position.row',
col: 'window.grid.position.col'
};
var emitResize = function($element) {
dc.events.trigger( function() {
$rootScope.$emit('gridster.resize', $element);
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@amergin
amergin / stretch_colors.js
Last active August 29, 2015 14:24
Stretch available color range to be used based on the values
// Specs:
// - As a default, the colour range should be scaled so, that at least 70% (..ish) of the colour range is available for the data shown.
// Example: we have a map with lowest positive correlation at r=0.85 and highest at r=0.99 while the negative correlations span from r=-0.2 to r=-0.35. The desired colour range would then be as follows:
// 100% red at r=0.99,
// 30% red at r=0.85,
// white at r=0,
// 30% blue at r=-0.2 and
// 100% blue at r=-0.35.
function CustomScale() {
var t = beta / _sqrt;
console.log("degrees", degrees);
console.log("beta", beta, "sqrt", _sqrt);
console.log("t=", t, "tprob=", statDist.tprob(degrees, t));
var pvalue = 2 * (1 - statDist.tprob(degrees, t));
console.log("pvalue=", pvalue);
Tulosteet ylläolevasta:
degrees 82 (program):64
beta 1.0097334538696747 sqrt 0.015688694906613447 (program):65