Skip to content

Instantly share code, notes, and snippets.

View rexey3s's full-sized avatar

Chuong Dang rexey3s

View GitHub Profile
@rexey3s
rexey3s / gist:fd7269f0192ed55ab8fe3506bb2561fd
Created May 23, 2016 03:52
Dockerfile of audio live stream to node
FROM node:6.2.0-wheezy
RUN git clone https://github.com/gabrielpoca/browser-pcm-stream.git
WORKDIR /browser-pcm-stream
RUN npm install
CMD ["node", "app.js"]
http://sharadchhetri.com/2014/07/29/install-nginx-source-centos-7/
./configure --user=www-data --group=www-data --sbin-path=/usr/sbin/nginx --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --pid-path=/var/run/nginx.pid --with-select_module --with-poll_module --with-ipv6 --with-http_ssl_module --with-http_degradation_module --with-http_stub_status_module --with-http_perl_module --add-module=./nginx-rtmp-module --add-module=./nginx-upload-module --add-module=./nginx-upload-progress-module --with-cpu-opt=CPU --with-pcre --with-pcre-jit --with-md5-asm --with-sha1-asm --with-zlib-asm=CPU --with-libatomic --with-debug --with-ld-opt="-Wl,-E"
./configure --user=nginx --group=nginx --sbin-path=/usr/sbin/nginx --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --pid-path=/var/run/nginx.pid --with-select_module --with-poll_module --with-ipv6 --with-http_ssl_module --with-http_realip_module --with-http_addition_module --with-http_xslt_module --with-http_image_filter_module --with-http_geoip_module --with-http_sub_module --with-http_dav_module --with-http_flv_module --with-http_mp4_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_auth_request_module --with-http_random_index_module --with-http_secure_link_module --with-http_degradation_module --with-http_stub_status_module --with-http_perl_module --add-module=./nginx-rtmp-module --add-module=./nginx-upload-module --with-cpu-opt=CPU --with-pcre --with-pcre-jit --with-md5-asm --with-sha1-asm --with-zlib-asm=CPU --with-libatomic --with-debug --with-ld-opt="-Wl,-E"
@rexey3s
rexey3s / preprocessor_fun.h
Created April 9, 2016 12:18 — forked from aras-p/preprocessor_fun.h
Things to commit just before leaving your job
// Just before switching jobs:
// Add one of these.
// Preferably into the same commit where you do a large merge.
//
// This started as a tweet with a joke of "C++ pro-tip: #define private public",
// and then it quickly escalated into more and more evil suggestions.
// I've tried to capture interesting suggestions here.
//
// Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_,
// @YuriyODonnell, @rygorous, @cmuratori, @mike_acton, @grumpygiant,
docker-machine create -d generic \
--engine-storage-driver=overlay --swarm --swarm-master \
--swarm-image hypriot/rpi-swarm:latest \
--swarm-discovery="consul://10.31.57.70:8500" \
--engine-opt="cluster-store=consul://10.31.57.70:8500" \
--engine-opt="cluster-advertise=eth0:2376" \
--generic-ip-address=$(getip swarm-dc1-pi01.local) \
swarm-master
docker-machine create -d generic \
@rexey3s
rexey3s / persistence.xml
Created October 16, 2015 02:01 — forked from mortezaadi/persistence.xml
persistence xml configurations for major databases and jpa providers
<?xml version="1.0" encoding="UTF-8"?>
<persistence xmlns="http://java.sun.com/xml/ns/persistence"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence
http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"
version="1.0">
<!-- derby -->
@rexey3s
rexey3s / AutowiringSpringBeanJobFactory.java
Created October 4, 2015 13:44 — forked from jelies/AutowiringSpringBeanJobFactory.java
Quartz (2.1.6) java config with spring (3.2.1). Using a SpringBeanJobFactory to automatically autowire quartz classes.
package com.jelies.spring3tomcat7.config.quartz;
import org.quartz.spi.TriggerFiredBundle;
import org.springframework.beans.factory.config.AutowireCapableBeanFactory;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;
import org.springframework.scheduling.quartz.SpringBeanJobFactory;
/**
* This JobFactory autowires automatically the created quartz bean with spring @Autowired dependencies.
.configure \
--prefix=/usr/share/nginx \
--conf-path=/etc/nginx/nginx.conf \
--error-log-path=/var/log/nginx/error.log \
--user=www-data \
--group=www-data \
--http-client-body-temp-path=/var/lib/nginx/body \
--http-fastcgi-temp-path=/var/lib/nginx/fastcgi \
--http-log-path=/var/log/nginx/access.log \
--http-proxy-temp-path=/var/lib/nginx/proxy \
@rexey3s
rexey3s / default
Created January 23, 2015 07:38
nginx/sites-available
##
# You should look at the following URL's in order to grasp a solid understanding
# of Nginx configuration files in order to fully unleash the power of Nginx.
# http://wiki.nginx.org/Pitfalls
# http://wiki.nginx.org/QuickStart
# http://wiki.nginx.org/Configuration
#
# Generally, you will want to move this file somewhere, and start with a clean
# file but keep this around for reference. Or just disable in sites-enabled.
#