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 | |
MAINTAINER "Yoanis Gil <[email protected]>" | |
RUN apt-get update && apt-get -y install python2.7 | |
ADD ./helloworld.py /helloworld.py | |
ENTRYPOINT python2.7 /helloworld.py |
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
#vim:set ft=dockerfile: | |
FROM ubuntu:14.04 | |
MAINTAINER Yoanis Gil <[email protected]> | |
ENV DEBIAN_FRONTEND noninteractive | |
# PHP5 Stack and nginx | |
RUN apt-get update | |
RUN apt-get -y install php5-fpm php5-mysql php-apc php5-imagick php5-imap php5-mcrypt php5-curl php5-cli php5-gd php5-pgsql\ | |
php5-sqlite php5-common php-pear curl php5-json php5-redis php5-memcache nginx-full python-pip curl |
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
user www-data; | |
daemon off; | |
error_log /dev/stdout info; | |
worker_processes 1; | |
pid /run/nginx.pid; | |
events { | |
worker_connections 768; | |
# multi_accept on; | |
} |
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
----Daemon.sh | |
#!/bin/bash | |
while : ; do sleep 1 ; echo test ; done | |
---Docker run | |
docker run --name testlog -v $(pwd)/daemon.sh:/daemon.sh -ti -d --log-driver=syslog --log-opt address=tcp://aws034:1514 ubuntu ./daemon.sh |
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 hasOffersMiddleware = new TykJS.TykMiddleware.NewMiddleware({}); | |
hasOffersMiddleware.NewProcessRequest(function(request, session) { | |
request.AddParams["api_key"] = session.meta_data['ho_api_key']; | |
request.AddParams["NetworkId"] = session.meta_data['ho_NetworkId']; | |
return hasOffersMiddleware.ReturnData(request, session.meta_data); | |
}); | |
log("HasOffers middleware initialised"); |
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 crStatsMiddleware = new TykJS.TykMiddleware.NewMiddleware({}); | |
var Base64 = { | |
// private property | |
_keyStr : "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=", | |
// public method for encoding | |
encode : function (input) { | |
var output = ""; |
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
processor : 0 | |
vendor_id : GenuineIntel | |
cpu family : 6 | |
model : 60 | |
model name : Intel(R) Core(TM) i3-4130 CPU @ 3.40GHz | |
stepping : 3 | |
microcode : 0x1c | |
cpu MHz : 3348.070 | |
cache size : 3072 KB | |
physical id : 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
def update_ring(ring_number, matrix): | |
for i, row in enumerate(matrix): | |
for j, value in enumerate(row): | |
if value == 0 and (i in [ring_number, len(row) - ring_number - 1] or j in [ring_number, len(row) - ring_number - 1]): | |
matrix[i][j] = ring_number + 1 | |
def pyramidMatrix(N): | |
matrix = [] |
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
master: | |
image: elasticsearch:2 | |
ports: | |
- "9200:9200" | |
restart: always | |
container_name: es_master | |
es-node: | |
image: elasticsearch:2 | |
command: elasticsearch --discovery.zen.ping.unicast.hosts=es_master |
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
odoo: | |
image: odoo:9 | |
ports: | |
- "8069:8069/tcp" | |
links: | |
- "db:db" | |
db: | |
image: postgres:9 | |
environment: | |
- POSTGRES_USER=odoo |
OlderNewer