This file contains hidden or 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 twisted.internet import reactor | |
from twisted.python.syslog import startLogging | |
from twisted.words.protocols.jabber.client import XMPPAuthenticator | |
from twisted.words.protocols.jabber.jid import JID | |
from twisted.words.protocols.jabber.xmlstream import XmlStreamFactory | |
from wokkel.subprotocols import StreamManager, XMPPHandler | |
startLogging() | |
factory = XmlStreamFactory(XMPPAuthenticator(JID('user@localhost'), u'pass123')) |
This file contains hidden or 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 | |
RUN wget http://www.process-one.net/downloads/downloads-action.php?file=/ejabberd/14.07/ejabberd-14.07-linux-x86_64-installer.run -O ejabberd-14.07-linux-x86_64-installer.run | |
RUN chmod +x ejabberd-14.07-linux-x86_64-installer.run | |
RUN ./ejabberd-14.07-linux-x86_64-installer.run --mode unattended --adminpw admin | |
ADD ejabberd.yml /opt/ejabberd-14.07/conf/ | |
EXPOSE 5222 5280 |
This file contains hidden or 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 locale-gen fr_FR.UTF-8 | |
ENV LANG fr_FR.UTF-8 | |
ENV LANGUAGE fr:en | |
ENV LC_ALL fr_FR.UTF-8 | |
RUN apt-get update | |
RUN apt-get install -y wget | |
RUN wget -qO- http://download.rethinkdb.com/apt/pubkey.gpg | sudo apt-key add - |
This file contains hidden or 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:latest | |
RUN locale-gen fr_FR.UTF-8 | |
ENV LANG fr_FR.UTF-8 | |
ENV LANGUAGE fr:en | |
ENV LC_ALL fr_FR.UTF-8 | |
RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10 | |
RUN echo 'deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen' | tee /etc/apt/sources.list.d/10gen.list |
This file contains hidden or 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 locale-gen fr_FR.UTF-8 | |
ENV LANG fr_FR.UTF-8 | |
ENV LANGUAGE fr:en | |
ENV LC_ALL fr_FR.UTF-8 | |
RUN sed -i 's/# deb/deb/' /etc/apt/sources.list | |
RUN apt-get update && apt-get install -y openssh-server git | |
RUN mkdir /var/run/sshd |
This file contains hidden or 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
bindir=$(dirname $0) | |
root_dir=$bindir/root_dir | |
montePointsPourChroot() { | |
sudo echo -ne « mounting pseudo filesystems: » | |
for pseudo in dev proc sys | |
do | |
sudo mount –bind /$pseudo $root_dir/$pseudo | |
echo -ne » $pseudo » | |
done |
This file contains hidden or 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
# install with ubuntu 13.10 64 bits - warning with 32bits apt wont find the package | |
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9 | |
sudo sh -c "echo deb http://get.docker.io/ubuntu docker main > /etc/apt/sources.list.d/docker.list" | |
sudo apt-get update | |
sudo apt-get install lxc-docker | |
# check install ok | |
sudo docker ps -a | |
# lets play with containers |
This file contains hidden or 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
sudo mount /dev/sda1 /mnt | |
sudo mount --bind /dev /mnt/dev | |
sudo mount --bind /dev/pts /mnt/dev/pts | |
sudo mount --bind /proc /mnt/proc | |
sudo mount --bind /sys /mnt/sys | |
sudo chroot /mnt |
This file contains hidden or 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
$fn = 200; | |
tasse(160, 120); | |
rotate([90, 0, 0]) | |
translate([65, 80, 0]) | |
anse_ronde(); | |
module tasse(hauteur, diametre) { | |
difference() { |
This file contains hidden or 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 zipfile import ZipFile | |
def append_file(memory_stream, file_name, file_content): | |
with ZipFile(memory_stream, 'a') as zf: | |
zf.writestr(file_name, file_content) |