Skip to content

Instantly share code, notes, and snippets.

View omkar0001's full-sized avatar

omkar omkar0001

  • Instafrsh
  • Gurgaon
View GitHub Profile
import cv2
from scipy.cluster import vq
print "Enter the input file name"
input_filename = raw_input()
print "Enter the output file name"
output_filename = raw_input()
# Reading the image in BGR format.
img = cv2.imread(input_filename)
#Reshaping the image matrix
z = img.reshape((-1,3))
##
# File:
# drupal
# Description:
# This file is meant to offer a very detailed set of instructions and best
# practices for deploying a Drupal website with Nginx. This file should be
# almost drop-in if the user is able to understand the three lines that
# need to be changed.
##
#For qa the image name is qa_lockhead
#For staging the image name is staging_lockhead
FROM <image_name>:latest
MAINTAINER examples@docker.io
RUN echo "deb http://archive.ubuntu.com/ubuntu precise main universe" > /etc/apt/sources.list
RUN apt-get update
RUN apt-get install -y openssh-server
RUN mkdir /var/run/sshd
EXPOSE 22
EXPOSE 80
FROM ubuntu
MAINTAINER Thatcher R. Peskens "thatcher@dotcloud.com"
# make sure the package repository is up to date
RUN echo "deb http://archive.ubuntu.com/ubuntu precise main universe" > /etc/apt/sources.list
RUN apt-get update
RUN apt-get install -y openssh-server
RUN mkdir /var/run/sshd
RUN echo 'root:entrayn123' |chpasswd
@omkar0001
omkar0001 / docker_daemon.sh
Created June 17, 2014 09:33
Daemon processes for docker
echo "......running script......"
sudo /usr/sbin/sshd -D
sudo service php5-fpm restart
sudo service nginx restart
sudo service mysql restart
sudo /usr/bin/mysqld_safe
server {
# This is the URI of your website. You can specify multiple sites to be
# served by the same Drupal installation.
server_name zabbix.dev;
# This is the root of the Drupal directory.
# Note that Drupal 6, Drupal 7, and Pressflow are interchangeable
root /usr/share/zabbix;
index index.php;
server {
listen 80;
server_name kibanadev.idelivr.info;
auth_basic "Restricted Access";
auth_basic_user_file /etc/nginx/htpasswd.users;
location / {
proxy_pass http://localhost:5601;
DJANGO_LOGLEVEL (DEBUG|INFO|ERROR|WARNING|CRITICAL)
DJANGO_LOG %{DJANGO_LOGLEVEL:log_level}\s+%{TIMESTAMP_ISO8601:log_timestamp}\s+%{TZ:log_tz}\s+%{NOTSPACE:logger}\s+%{WORD:module}\s+%{POSINT:proc_id}\s+%{GREEDYDATA:content}
input {
file {
path => "/home/ubuntu/idelivr-backend/*.log"
start_position => beginning
codec => multiline {
pattern => "^%{TIMESTAMP_ISO8601} "
negate => true
what => previous
}
}
input {
beats {
port => 5044
codec => multiline {
pattern => "^%{TIMESTAMP_ISO8601} "
negate => true
what => previous
}
}
}