Skip to content

Instantly share code, notes, and snippets.

<?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!';
/* 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 */
@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
@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 / 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 / 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/
<?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';

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

Config permissions for shared folder Source : https://stackoverflow.com/questions/37871470/how-to-change-permission-of-vmwares-shared-folder Command: vmhgfs-fuse .host:/ /mnt/hgfs -o uid=1000 -o gid=1000 -o umask=0033

Install vmware tools

yum install perl gcc make kernel-headers kernel-devel -y
yum install libmspack-devel xerces-c-devel libxml-security-c-devel gtkmm24-devel procps-ng-devel libdnet-devel libXtst-devel libsigc++20-devel pam-devel fuse-devel
yum install CUnit-devel
@dinhkk
dinhkk / Install-php7.md
Created July 28, 2017 04:17 — forked from hollodotme/Install-php7.md
Installing php7-fpm with phpredis and xdebug extension on Ubuntu 14.04

Install php7.0-fpm

# remove php5 modules
apt-get autoremove --purge php5-*
# add php-7.0 source list by [Ondřej Surý](https://github.com/oerdnj)
add-apt-repository ppa:ondrej/php
# Update index
apt-get update
# Install php7.0-fpm with needed extensions