Skip to content

Instantly share code, notes, and snippets.

php7.0

rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
yum install php70w php70w-opcache php70w-fpm php70w-common php70w-cli php70w-devel php70w-gd php70w-imap php70w-intl php70w-mbstring php70w-mcrypt php70w-mysqlnd php70w-pear 
yum install php70w-pecl-apcu php70w-pecl-memcached php70w-pecl-mongodb php70w-pecl-redis php70w-pecl-xdebug php70w-soap php70w-xmlrpc
<?php
/*
In this example the source media is located at
rtmp://server.test.com:1935/vod/mp4:sample.mp4
Flow player has the name split by 2 part. They are stored in respective variables below.
*/
$base_url = 'http://daohuyentrang.com:8018/videos/';
$video_url = 'dtHuong-dan-su-dung.mp4/playlist.m3u8';
@dinhkk
dinhkk / secure - nginx wordpress.txt
Last active March 5, 2017 11:00
secure nginx + wordpress
1. https://lamosty.com/2015/04/14/securing-your-wordpress-site-running-on-nginx/
2. https://deliciousbrains.com/hosting-wordpress-yourself-nginx-security-tweaks-woocommerce-caching-auto-server-updates/
3. https://codeable.io/significantly-improve-wordpress-security/
@dinhkk
dinhkk / php5.6 + nginx + mariaDB on centos-7
Last active November 19, 2017 13:11
bash install centos 7
#login as root
yum update
rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
#install php
yum install php56w-fpm php56w-opcache
yum install php56w
yum install php56w-bcmath php56w-common php56w-devel php56w-gd php56w-imap php56w-intl php56w-ldap
@dinhkk
dinhkk / install-comodo-ssl-cert-for-nginx.rst
Created October 4, 2016 14:49 — forked from bradmontgomery/install-comodo-ssl-cert-for-nginx.rst
Steps to install a Comodo PositiveSSL certificate with Nginx.

Setting up a SSL Cert from Comodo

I use Namecheap.com as a registrar, and they resale SSL Certs from a number of other companies, including Comodo.

These are the steps I went through to set up an SSL cert.

Purchase the cert

@dinhkk
dinhkk / mkgit-centos6.sh
Created August 26, 2016 08:13 — forked from eyecatchup/mkgit-centos6.sh
Bash script to install the latest Git version on CentOS 6.x.
#!/usr/bin/env bash
# Install the latest version of git on CentOS 6.x
# Install Required Packages
sudo yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel
sudo yum install gcc perl-ExtUtils-MakeMaker
# Uninstall old Git RPM
sudo yum remove git
/* Large desktop */
@media (min-width: 1200px) { ... }
/* Portrait tablet to landscape and desktop */
@media (min-width: 768px) and (max-width: 979px) { ... }
/* Landscape phone to portrait tablet */
@media (max-width: 767px) { ... }
/* Landscape phones and down */
<?php
// Put your device token here (without spaces):
$deviceToken = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx';
// Put your private key's passphrase here:
$passphrase = 'xxxxxxx';
// Put your alert message here:
$message = 'A push notification has been sent!';