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
!function(a,b){"function"==typeof define&&define.amd?define([],b):"undefined"!=typeof module&&module.exports?module.exports=b():a.lscache=b()}(this,function(){function a(){var a="__lscachetest__",c=a;if(void 0!==n)return n;try{if(!localStorage)return!1}catch(a){return!1}try{h(a,c),i(a),n=!0}catch(a){n=!(!b(a)||!localStorage.length)}return n}function b(a){return!!(a&&"QUOTA_EXCEEDED_ERR"===a.name||"NS_ERROR_DOM_QUOTA_REACHED"===a.name||"QuotaExceededError"===a.name)}function c(){return void 0===o&&(o=null!=window.JSON),o}function d(a){return a.replace(/[[\]{}()*+?.\\^$|]/g,"\\$&")}function e(a){return a+q}function f(){return Math.floor((new Date).getTime()/s)}function g(a){return localStorage.getItem(p+u+a)}function h(a,b){localStorage.removeItem(p+u+a),localStorage.setItem(p+u+a,b)}function i(a){localStorage.removeItem(p+u+a)}function j(a){for(var b=new RegExp("^"+p+d(u)+"(.*)"),c=localStorage.length-1;c>=0;--c){var f=localStorage.key(c);f=f&&f.match(b),f=f&&f[1],f&&f.indexOf(q)<0&&a(f,e(f))}}function k(a){va
<?php
$params['body'] = [
[
'_index' => 'service_panel',
'_type' => 'directoryies'
],
[
'_source' => [
'includes' => ['name_en','url_key','vanity_url','logo']
$('#select-emp').selectize({
persist: false,
valueField: 'name',
labelField: 'name',
searchField: ['name', 'role'],
options: [
{id: 'E121210', name: 'Vasanthan',role :'Accountant' },
{id: 'E238843', name: 'Vigikaran',role :'Developer'},
{id: 'E945495',name:'Gokulavannan',role :'Designer'}
],
Install PHP 5.6 On linux (Debian, Ubuntu, Mint ...)
sudo apt-get install python-software-properties
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install -y php5.6
heck Installed PHP Version
php -v
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@vigikaran
vigikaran / gist:b5c275a7937640cc2975f671ac743be0
Created April 24, 2018 14:18
FFmpeg command line examples

Simple Stream

ffmpeg -i rtmp://server.ip/application/streamname -c copy -f flv rtmp://server.ip/application/streamname

Copy to FLV

ffmpeg -i %1 -c copy -copyts %1.flv

Copy 5 minutes to MP4

ffmpeg -i %1 -t 00:05:00 -c copy -copyts %1.mp4

Encode to MP4 at 8k bitrate, veryfast preset and film tuning, AAC Audio

@vigikaran
vigikaran / update_curl.sh
Created April 26, 2018 22:33 — forked from fideloper/update_curl.sh
Update curl on Ubuntu 14.04
#! /usr/bin/env bash
# Install any build dependencies needed for curl
sudo apt-get build-dep curl
# Get latest (as of Feb 25, 2016) libcurl
mkdir ~/curl
cd ~/curl
wget http://curl.haxx.se/download/curl-7.50.2.tar.bz2
tar -xvjf curl-7.50.2.tar.bz2
@vigikaran
vigikaran / Instructions.sh
Created May 11, 2018 22:03 — forked from GhazanfarMir/Instructions.sh
Install PHP7.2 NGINX and PHP7.2-FPM on Ubuntu 16.04
########## Install NGINX ##############
# Install software-properties-common package to give us add-apt-repository package
sudo apt-get install -y software-properties-common
# Install latest nginx version from community maintained ppa
sudo add-apt-repository ppa:nginx/stable
# Update packages after adding ppa
class Errors {
constructor() {
this.errors = {};
}
has(field) {
return this.errors.hasOwnProperty(field);
}
Add a new user to the www-data group
In this example, add a new user called vivek to the www-data group, enter:
sudo useradd -g www-data vivek
### set the password for vivek user ###
sudo passwd vivek