One Paragraph of project description goes here
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
import org.springframework.beans.factory.annotation.Autowired; | |
import org.springframework.core.io.FileSystemResource; | |
import org.springframework.mail.SimpleMailMessage; | |
import org.springframework.mail.javamail.JavaMailSender; | |
import org.springframework.mail.javamail.MimeMessageHelper; | |
import org.springframework.stereotype.Service; | |
import javax.mail.MessagingException; |
#http://docs.spring.io/spring-boot/docs/current/reference/html/deployment-install.html | |
#https://stackoverflow.com/questions/28500066/how-to-deploy-springboot-maven-application-with-jenkins | |
sudo mvn clean package | |
service=appp_pay | |
jarfile=/var/lib/jenkins/workspace/appp_pay/target/appp-pay-0.1.jar | |
if ps ax | grep -v grep | grep -v $0 | grep $service > /dev/null | |
then | |
sudo service appp_pay stop | |
sudo unlink /etc/init.d/appp_pay | |
sudo chmod +x $jarfile |
server{ | |
listen 80; | |
server_name ci.xxx.vn; | |
location / { | |
proxy_set_header Host $host:$server_port; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_set_header X-Forwarded-Proto $scheme; |
remove old version | |
#apt-get remove docker docker-engine | |
install all preRequisite packages | |
#apt install apt-transport-https \ | |
ca-certificates software-properties-common \ | |
curl apt-transport-https | |
composer global require "fxp/composer-asset-plugin:^1.3.1" | |
composer config github-oauth.github.com fefbbf1d7e41286ed05fe5314260f7943e37a765 | |
composer update | |
php init --env=Development --overwrite=All |
#! /bin/bash | |
# | |
# Diffusion youtube avec ffmpeg | |
# Configurer youtube avec une résolution 720p. La vidéo n'est pas scalée. | |
VBR="2500k" # Bitrate de la vidéo en sortie | |
FPS="30" # FPS de la vidéo en sortie | |
QUAL="medium" # Preset de qualité FFMPEG | |
YOUTUBE_URL="rtmp://a.rtmp.youtube.com/live2" # URL de base RTMP youtube |
-- a quick LUA access script for nginx to check IP addresses against an | |
-- `ip_blacklist` set in Redis, and if a match is found send a HTTP 403. | |
-- | |
-- allows for a common blacklist to be shared between a bunch of nginx | |
-- web servers using a remote redis instance. lookups are cached for a | |
-- configurable period of time. | |
-- | |
-- block an ip: | |
-- redis-cli SADD ip_blacklist 10.1.1.1 | |
-- remove an ip: |
# Let us consider the following typical mysql backup script: | |
mysqldump --routines --no-data -h $mysqlHost -P $mysqlPort -u $mysqlUser -p$mysqlPassword $database | |
# It succeeds but stderr will get: | |
# Warning: Using a password on the command line interface can be insecure. | |
# You can fix this with the below hack: | |
credentialsFile=/mysql-credentials.cnf | |
echo "[client]" > $credentialsFile | |
echo "user=$mysqlUser" >> $credentialsFile | |
echo "password=$mysqlPassword" >> $credentialsFile |
The ngx_http_core_module module supports embedded variables with names matching the Apache Server variables. First of all, these are variables representing client request header fields, such as $http_user_agent, $http_cookie, and so on. Also there are other variables: