This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
apt-get -y update | |
apt-get -y install nginx-extras build-essential libpcre3-dev libssl-dev libgeoip-dev libpq-dev libxslt1-dev libgd2-xpm-dev | |
wget -c https://openresty.org/download/openresty-1.9.15.1.tar.gz | |
tar zxvf openresty-1.9.15.1.tar.gz | |
cd openresty-1.9.15.1 | |
./configure \ | |
--sbin-path=/usr/sbin/nginx \ | |
--conf-path=/etc/nginx/nginx.conf \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
# Fill our vars and run on cli | |
# $ php -f db-connect-test.php | |
$dbname = 'name'; | |
$dbuser = 'user'; | |
$dbpass = 'pass'; | |
$dbhost = 'host'; | |
$connect = mysql_connect($dbhost, $dbuser, $dbpass) or die("Unable to Connect to '$dbhost'"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#https://www.vultr.com/docs/setup-nginx-rtmp-on-ubuntu-14-04 | |
apt-get install build-essential libpcre3 libpcre3-dev libssl-dev unzip software-properties-common | |
mkdir /usr/build | |
#Download the Nginx and Nginx-RTMP source. | |
wget http://nginx.org/download/nginx-1.7.8.tar.gz | |
wget https://github.com/arut/nginx-rtmp-module/archive/master.zip | |
#Extract the Nginx and Nginx-RTMP source. | |
tar -zxvf nginx-1.7.8.tar.gz | |
unzip master.zip | |
#Switch to the Nginx directory. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ sudo nano /etc/sysctl.conf | |
vm.overcommit_memory=1 | |
$ sysctl vm.overcommit_memory=1 | |
$ sysctl -w fs.file-max=100000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
@param {UNIX timestamp} timestamp - an unix timestamp in seconds | |
*/ | |
Handlebars.registerHelper("prettyDate", function (timestamp) { | |
var date, | |
monthNames, | |
secs = ((new Date()).getTime() / 1000) - timestamp, | |
minutes = secs / 60, | |
hours = minutes / 60, |
NewerOlder