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
# using VirtualBox version $VBOX_VERSION | |
FROM boot2docker/boot2docker | |
RUN apt-get install p7zip-full | |
RUN mkdir -p /vboxguest && \ | |
cd /vboxguest && \ | |
curl -L -o vboxguest.iso http://download.virtualbox.org/virtualbox/$VBOX_VERSION/VBoxGuestAdditions_$VBOX_VERSION.iso && \ | |
7z x vboxguest.iso -ir'!VBoxLinuxAdditions.run' && \ | |
sh VBoxLinuxAdditions.run --noexec --target . && \ |
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 | |
if swapon -s | grep -q /mnt/swapfile | |
then | |
echo "Swapfile already mounted" | |
else | |
if [ -e /mnt/swapfile ] | |
then | |
echo "Mounting swapfile" | |
swapon /mnt/swapfile |
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 FS = require('fs'); | |
var Fiber = require('./fiber'); // Not to be confused with the existing node-fibers module | |
// readFile is a normal non-blocking, async function, but internally it can use | |
// the coroutine helper fiber. These kinds of coroutines are no more dangerous | |
// to the caller than any other async function. | |
function readfile(filename, next) { | |
// The call to Fiber is non-blocking. It's contents are only run sync till | |
// the first call to wait and then it returns. | |
Fiber(function (resume, wait) { |