This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ npm install --loglevel silly -g hawk | |
npm info it worked if it ends with ok | |
npm verb cli [ '/home/pi/work/share/node-official/node-v0.10.19-linux-arm-pi/bin/node', | |
npm verb cli '/home/pi/work/share/node-official/node-v0.10.19-linux-arm-pi/bin/npm', | |
npm verb cli 'install', | |
npm verb cli '--loglevel', | |
npm verb cli 'silly', | |
npm verb cli '-g', | |
npm verb cli 'hawk' ] | |
npm info using [email protected] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
var lrSnippet = require('grunt-contrib-livereload/lib/utils').livereloadSnippet; | |
var mountFolder = function (connect, dir) { | |
return connect.static(require('path').resolve(dir)); | |
}; | |
// ... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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()) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |