Skip to content

Instantly share code, notes, and snippets.

# docker run -ti --rm -e DISPLAY=$DISPLAY -v /tmp/.X11-unix/:/tmp/.X11-unix --privileged --env="QT_X11_NO_MITSHM=1" --ipc=host --security-opt apparmor=unconfined --net=host -v /run/cups/cups.sock:/run/cups/cups.sock --env CUPS_SERVER=/run/cups/cups.sock epson
FROM ubuntu:bionic
RUN apt update && apt install -y wget qt4-default lsb libcups2
RUN wget 'https://download3.ebz.epson.net/dsc/f/03/00/14/28/59/566f892e1ca2e35685ff06dfd972b1c66fbed4d5/epson-printer-utility_1.1.1-1lsb3.2_amd64.deb'
RUN dpkg -i epson-printer-utility_1.1.1-1lsb3.2_amd64.deb
CMD service ecbd start && epson-printer-utility
#define PIN_INT 2
#define PIN_LED 13
void setup() {
// put your setup code here, to run once:
pinMode( PIN_LED, OUTPUT );
pinMode( PIN_INT, INPUT );
digitalWrite( PIN_LED, LOW );
}
#define PIN_BLINK_LED_BLUE 11
#define PIN_BLINK_LED_RED 9
#define PIN_BLINK_LED_GREEN 10
void setup() {
// put your setup code here, to run once:
pinMode( PIN_BLINK_LED_BLUE, OUTPUT );
pinMode( PIN_BLINK_LED_RED, OUTPUT );
pinMode( PIN_BLINK_LED_GREEN, OUTPUT );
digitalWrite( PIN_BLINK_LED_BLUE, LOW );
version: "3"
services:
nginx:
image: nginx
networks:
- frontend
php:
image: php:fpm
networks:
@Servuc
Servuc / docker-compose.yml
Last active October 10, 2019 19:26
docker-swarm
version: '3'
services:
webapp:
image: YOUR_PHP
ports:
- 12345:12345
deploy:
replicas: 10
restart_policy:
@Servuc
Servuc / docker-compose-v2.yml
Last active October 4, 2019 14:38
Teach Docker-compose - TP1
version: '2'
services:
mysql:
image: mysql
command: mysqld --default-authentication-plugin=mysql_native_password
environment:
MYSQL_USER: dbuser
MYSQL_PASSWORD: dbpassword
MYSQL_ROOT_PASSWORD: dbrootpassword
@Servuc
Servuc / docker-compose.yml
Created August 7, 2018 11:18
Example of docker-compose.yml
version: '3'
services:
web:
build: .
ports:
- "5000:5000"
redis:
image: "redis:alpine"
# From : https://docs.docker.com/compose/gettingstarted/#step-3-define-services-in-a-compose-file
@Servuc
Servuc / .gitlab-ci.yml
Created August 6, 2018 11:27
Example of continue integration to Docker Hub
stages:
- build
variables:
CONTAINER_TAG: IMAGE_NAME:$CI_BUILD_REF_NAME
buildContainer:
image: docker:latest
stage: build
script:
@Servuc
Servuc / Dockerfile.php.example
Last active October 12, 2017 12:07
Example of Dockerfile for teaching
FROM debian:latest
RUN apt-get update && apt-get upgrade -y && apt-get install -y php-cli && \
mkdir /monDossier && mkdir /monDossier/share
COPY monScript.php /monDossier
ADD http://proof.ovh.net/files/1Mb.dat /monDossier
RUN mv /monDossier/monScript.php /monDossier/index.php
@Servuc
Servuc / README.md
Last active September 29, 2017 21:55
Teaching :) - Example of Express server with SerialPort reading

Express server and serial port reading

This JS file demonstrate how open a serial port to read it, and display read value over HTTP server.

Copy/Paste the script will display value at : http://localhost:3000 enjoy.

Install

yarn add serialport
yarn add express