Skip to content

Instantly share code, notes, and snippets.

View vigikaran's full-sized avatar
🎯
All the tools are out there and the only thing that limits us is our imagination

Vigikaran vigikaran

🎯
All the tools are out there and the only thing that limits us is our imagination
View GitHub Profile
<div class="remodal-bg">
<div class="remodal" data-remodal-id="location_modal" data-remodal-options="hashTracking: false, closeOnOutsideClick: false , closeOnEscape:false">
<button data-remodal-action="close" class="remodal-close"></button>
</div>
</div>
#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.
@vigikaran
vigikaran / db-connect-test.php
Created December 23, 2016 12:38 — forked from chales/db-connect-test.php
Script for a quick PHP MySQL DB connection test.
<?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'");
@vigikaran
vigikaran / openresty-ubuntu-install.sh
Created January 3, 2017 11:59 — forked from alex-roman/openresty-ubuntu-install.sh
Easy install openresty (used and tested on Ubuntu 14.04, 15.10 and 16.04)
#!/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 \
@vigikaran
vigikaran / HLS_dvr.sh
Created January 4, 2017 20:56 — forked from John07/HLS_dvr.sh
A small script to make recording http live streams (HLS, those streams that work on iOS devices) nicer on a Mac. Script records the stream for a defined period of time and sends the user notifications if anything goes wrong and once it's done.
# required: ffmpeg (e.g. from homebrew), terminal-notifier from https://github.com/alloy/terminal-notifier
# you can schedule this with launchd to run e.g. weekly
# Specify in seconds how long the script should record (default here is 1 hour).
seconds=3600
# Date format for the recording file name
DATE=`date "+%d-%m-%y_%H-%M"`
# start ffmpeg recording
An error occurred during execution; please try again later.
Additional information:
Zend_Json_Exception
File:
/var/www/rednool.com/vendor/magento/zendframework1/library/Zend/Json.php:97
Message:
Decoding failed: Syntax error
@vigikaran
vigikaran / Laravel PHP7 LEMP AWS.md
Created January 27, 2017 21:27 — forked from santoshachari/Laravel PHP7 LEMP AWS.md
Laravel 5.x on Ubuntu 14.x, PHP 7.x, Nginx 1.9.x

#Steps to install latest Laravel, LEMP on AWS Ubuntu 14.4 version. This tutorial is the improvised verision of this tutorial on Digitalocean based on my experience.

Install PHP 7 on Ubuntu

Run the following commands in sequence.

sudo apt-get install -y language-pack-en-base
sudo LC_ALL=en_US.UTF-8 add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install zip unzip
@vigikaran
vigikaran / README.md
Created January 28, 2017 11:57 — forked from magnetikonline/README.md
Nginx FastCGI cache configuration example.

Nginx FastCGI cache

Example /etc/nginx/nginx.conf using FastCGI (e.g. to PHP-FPM) with FastCGI cache enabled. This will capture returned data and persist it to a disk based cache store for a configurable amount of time, great for robust full page caching.

Will need to create a directory to hold cache files, for the example given here that would be:

$ sudo mkdir -p /var/cache/nginxfastcgi
$ chown www-data: /var/cache/nginxfastcgi
$.getJSON( "/notice?type=json", function( data ) {
var items = [];
$.each( data, function(e) {
items.push('<a href="'+e.url+'" target="_blank"><h2 class="cd_notice_tit">'+e.title+'</h2><div class="cd_notice_detail"><div class="cd_not_img_dv"><span class="cd_ntce_main_name">'+e.name+'</span>
<div class="cd_ntce_main_div"><div class="cd_n_img"><img src="'+e.img+'" alt=""></div><div class="cd_nt_img_lft"><div class="cd_name">'+e.born+'</div>
<div class="cd_name">'+e.live+'</div><div class="cd_name">'+e.date+'</div></div></div></div></div></a></div><div class="cd_notice_box">
');
});
$("#notice").html(items.join(""));
@vigikaran
vigikaran / donate.md
Created February 6, 2017 17:55
My Paypal donate button in markdown format

Donation Button

Donate