Skip to content

Instantly share code, notes, and snippets.

View larroy's full-sized avatar
🎧
In the zone

Pedro Larroy larroy

🎧
In the zone
View GitHub Profile
@larroy
larroy / run.sh
Created September 6, 2017 13:15 — forked from detunized/run.sh
Mount a read-only folder inside a Docker container with OverlayFS on top
# On the host to run the container
docker run --privileged -i -t -v ~/host-folder-to-mount:/root/folder-ro:ro ubuntu
# Inside the container
# Need to create the upper and work dirs inside a tmpfs.
# Otherwise OverlayFS complains about AUFS folders.
mkdir -p /tmp/overlay && \
mount -t tmpfs tmpfs /tmp/overlay && \
mkdir -p /tmp/overlay/{upper,work} && \
mkdir -p /root/folder && \
@larroy
larroy / go.scala
Last active August 29, 2015 14:05 — forked from joa/go.scala
package go
import java.util.concurrent.{ArrayBlockingQueue => JArrayBlockingQueue, BlockingQueue => JBlockingQueue, TimeUnit}
object Channel {
def empty[A]: Channel[A] = new BlockingChannel()
def make[A]: Channel[A] = make(1)
def make[A](capacity: Int): Channel[A] = new BlockingChannel(capacity)
#include "SSLBuffer.h"
SSLBuffer::SSLBuffer()
:ssl(NULL)
,read_bio(NULL)
,write_bio(NULL)
,write_to_socket_callback(NULL)
,write_to_socket_callback_data(NULL)
,read_decrypted_callback(NULL)
,read_decrypted_callback_data(NULL)