g++ -g -Wall -I /path/to/libuv/include /path/to/libuv.a app.cpp -o app
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
description "Docker daemon" | |
start on filesystem | |
stop on runlevel [!2345] | |
respawn | |
pre-start script | |
# see also https://github.com/tianon/cgroupfs-mount/blob/master/cgroupfs-mount | |
if grep -v '^#' /etc/fstab | grep -q cgroup \ |
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
description "<Application name here>" | |
start on runlevel [23] | |
stop on shutdown | |
script | |
cd <path/to/project/here> | |
export NODE_ENV=production | |
# Be sure to have a `start` script in your `package.json` | |
<path/to>/.nvm/<version number>/bin/npm start |
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
FROM ubuntu:14.04 | |
RUN apt-get update; apt-get install -y wget build-essential | |
RUN wget http://download.redis.io/releases/redis-2.8.12.tar.gz | |
RUN tar xvfz redis-2.8.12.tar.gz | |
RUN cd redis-2.8.12; make; chmod +x $PWD/src/redis-server; ln -s $PWD/src/redis-server /usr/bin/redis-server | |
EXPOSE 6379 | |
CMD [ "redis-server", "--bind", "0.0.0.0" ] |
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
# Node.js v0.10.31 | |
FROM ubuntu:14.04 | |
RUN apt-get update; apt-get install -y curl | |
ENV VERSION 0.10.31 | |
ENV NODE_PATH node-v${VERSION}-linux-x64 | |
RUN curl http://nodejs.org/dist/v${VERSION}/${NODE_PATH}.tar.gz > ${NODE_PATH}.tar.gz | |
RUN tar xvfz ${NODE_PATH}.tar.gz | |
RUN ln -s /${NODE_PATH}/bin/node /bin/node | |
RUN ln -s /${NODE_PATH}/bin/npm /bin/npm |
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
var child_process = require('child_process'); | |
var fs = require('fs'); | |
process.stdout.pause(); | |
var fd = child_process.execFile('/bin/sh', ["-c", "read LINE < /dev/tty; echo $LINE > stdout; echo 1 > done"]); | |
while (true) { | |
try { | |
if (fs.readFileSync('done', {encoding: 'utf8'}).trim() === '1') { break; } | |
} catch (e) {} |
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
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | |
export GOPATH=$DIR | |
echo "Clean up source history downloaded" | |
find . -type d | grep \.hg$ | xargs rm -rf | |
find . -type d | grep \.bzr$ | xargs rm -rf | |
find . -type d | grep -v ^\./\.git$ | grep \.git$ | xargs rm -rf | |
# might need to add svn if we ever use SVN repos |
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
package main | |
import ( | |
"fmt" | |
"encoding/hex" | |
"log" | |
"errors" | |
) | |
const MAX_STACK_SIZE = 2048 |
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
/* global jest */ | |
var superagent = jest.genMockFunction().mockReturnThis(); | |
var Response = jest.genMockFunction().mockImplementation(function() { | |
this.status = 200; | |
this.ok = true; | |
}); | |
Response.prototype.get = jest.genMockFunction(); |
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
cmake_minimum_required(VERSION 3.1.0) | |
project(fibonacci) | |
add_definitions(-std=c99) | |
add_executable(fibonacci fib.c) |
OlderNewer