Pull update on master branch
git checkout master
git pull
Change back to feature_branch, pull and then rebase based on master branch, and resolve conflict (if any)
git checkout feature_branch
| #!/usr/bin/env python | |
| import click | |
| import sys | |
| from datetime import datetime, timedelta | |
| from otpauth import OtpAuth | |
| SECRET = "youHoyahc4Xee7geo6oo" | |
| @click.command() |
| --- | |
| - name: Add Jenkins apt key | |
| apt_key: url=http://pkg.jenkins-ci.org/debian-stable/jenkins-ci.org.key state=present | |
| - name: Add Java repository to sources | |
| apt_repository: repo="deb http://pkg.jenkins-ci.org/debian-stable binary/" state=present | |
| - name: Update APT package cache | |
| apt: update_cache=yes |
| --- | |
| - name: ensure required packages are installed for Java 7 | |
| apt: name={{ item }} state=latest update_cache=yes | |
| with_items: | |
| - python-software-properties | |
| - name: Add Java repository to sources | |
| apt_repository: repo='ppa:webupd8team/java' | |
| - name: Autoaccept license for Java |
| wget --no-cookies \ | |
| --no-check-certificate \ | |
| --header "Cookie: oraclelicense=accept-securebackup-cookie" \ | |
| "http://download.oracle.com/otn-pub/java/jdk/7u79-b15/jdk-7u79-linux-x64.tar.gz" \ | |
| -O jdk-7u79-linux-x64.tar.gz | |
| ## if you need java cryptography extension | |
| #wget --no-cookies \ | |
| # --no-check-certificate \ | |
| # --header "Cookie: oraclelicense=accept-securebackup-cookie" \ |
| tcpdump -i eth0 -s 0 -l -w - dst port 3306 | strings | perl -e ' | |
| while(<>) { chomp; next if /^[^ ]+[ ]*$/; | |
| if(/^(SELECT|UPDATE|DELETE|INSERT|SET|COMMIT|ROLLBACK|CREATE|DROP|ALTER)/i) { | |
| if (defined $q) { print "$q\n"; } | |
| $q=$_; | |
| } else { | |
| $_ =~ s/^[ \t]+//; $q.=" $_"; | |
| } | |
| }' |
| CREATE OR REPLACE FUNCTION round_minutes( TIMESTAMP WITH TIME ZONE, integer) | |
| RETURNS TIMESTAMP WITH TIME ZONE AS $$ | |
| SELECT date_trunc('hour', $1) + (cast(($2::varchar||' min') as interval) * round( (date_part('minute',$1)::float + date_part('second',$1)/ 60.)::float / cast($2 as float))) | |
| $$ LANGUAGE SQL IMMUTABLE; | |
| CREATE OR REPLACE FUNCTION floor_minutes( TIMESTAMP WITH TIME ZONE, integer ) | |
| RETURNS TIMESTAMP WITH TIME ZONE AS $$ | |
| SELECT round_minutes( $1 - cast((($2/2)::varchar ||' min') as interval ), $2 ); | |
| $$ LANGUAGE SQL IMMUTABLE; |
Install Nginx
sudo apt-get install nginx
Install MySQL, rrdtool, snmp
sudo apt-get install mysql-server rrdtool snmp snmpd
Install PHP-FPM and PHP modules