This instructions allow you to take periodical heapdumps.
To use in your project, first install heapdump, then add the following code to your app just after requiring 'fs'.
This instructions allow you to take periodical heapdumps.
To use in your project, first install heapdump, then add the following code to your app just after requiring 'fs'.
#!/usr/bin/env bash | |
export NODE_VER=0.8.15 | |
cd ~ | |
rm -rf ~/work/node-build/node-$NODE_VER;mkdir -p ~/work/node-build && cd ~/work/node-build | |
rm -rf ~/opt/node-$NODE_VER;mkdir -p ~/opt/node-$NODE_VER | |
[[ -f node-v$NODE_VER.tar.gz ]] || \ | |
curl -O http://nodejs.org/dist/v$NODE_VER/node-v$NODE_VER.tar.gz |
ssh <sudoer>@<server> | |
sudo su - | |
mkdir -p <share-starting-at-/> | |
cat > /etc/exports <<EOF | |
# /path options clients | |
<share-starting-at-/> -network 192.168.1.0 -mask 255.255.255.0 | |
EOF |
mkdir hadoop | |
cd hadoop | |
wget http://mirrors.fe.up.pt/pub/apache/hadoop/common/hadoop-1.1.1/hadoop-1.1.1-bin.tar.gz | |
tar zxvf hadoop-1.1.1-bin.tar.gz | |
mkdir conf | |
cp hadoop-1.1.1/conf/* conf/ | |
export HADOOP_CONF_DIR=$PWD/conf |
template<class C> class TypedArrayWrapper { | |
private: | |
Local<Object> array; | |
Handle<Object> buffer; | |
int offset; | |
public: | |
TypedArrayWrapper(const Local<Value>& arg) : | |
array(arg->ToObject()), | |
buffer(array->Get(String::New("buffer"))->ToObject()), | |
offset(array->Get(String::New("byteOffset"))->Int32Value()) { |
Statistical profiling result from v8.log, (106127 ticks, 18327 unaccounted, 0 excluded). | |
[Unknown]: | |
ticks total nonlib name | |
18327 17.3% | |
[Shared libraries]: | |
ticks total nonlib name | |
31348 29.5% 0.0% /home/pi/opt/v8-99a2d28-shared/lib/libv8.so | |
200 0.2% 0.0% /lib/arm-linux-gnueabihf/ld-2.13.so |
#!/bin/bash | |
cd `dirname $0` | |
curl\ | |
--remote-name \ | |
--remote-header-name\ | |
http://www.topcoder.com/contest/arena/ContestAppletProd.jnlp | |
JAVAWS="/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/javaws" |
#!/usr/bin/env node --trace_gc | |
# See also "Timers" in | |
# http://coding.smashingmagazine.com/2012/11/05/writing-fast-memory-efficient-javascript/ | |
'use strict'; | |
process.on('uncaughtException', function (err) { | |
console.log('Caught exception: ' + err); | |
}); |
#include <ColorLCDShield.h> | |
#define SHIFT_TO_RED 8 | |
#define SHIFT_TO_GREEN 4 | |
#define SHIFT_TO_BLUE 0 | |
#define BACKGROUND BLACK // room for growth, adjust the background color according to daylight | |
#define RGB(r,g,b) (((b) << SHIFT_TO_BLUE) + ((g) << SHIFT_TO_GREEN) + ((r) << SHIFT_TO_RED)) | |
LCDShield lcd; |