Skip to content

Instantly share code, notes, and snippets.

View manishnakar's full-sized avatar
💭
Exploring Nodejs

Manish Nakar manishnakar

💭
Exploring Nodejs
  • Mumbai, India
  • 13:36 (UTC +05:30)
View GitHub Profile
sudo add-apt-repository ppa:webupd8team/java
sudo apt update; sudo apt install oracle-java8-installer
javac -version
Install Jenkins
==================
wget -q -O - https://pkg.jenkins.io/debian/jenkins-ci.org.key | sudo apt-key add -
sudo sh -c 'echo deb http://pkg.jenkins.io/debian-stable binary/ > /etc/apt/sources.list.d/jenkins.list'
sudo apt-get update
sudo apt-get install -y jenkins ant git-core curl unzip
/**
* Using the address in memory, fetch get latitude and longitude
* from google maps api and set them as attributes
*/
public function geocode() {
if(!empty($this->zip)) {
$string[] = $this->street;
$string[] = sprintf('%s, %s %s', $this->city, $this->state, $this->zip);
$string[] = $this->country_name;
}
Step 1 : Install Meld from ubuntu software centre.
Step 2 : Config difftool
Open terminal and go to project path
e.g. $ cd /var/www/html
git config --global diff.tool meld
git config --global difftool.prompt false
# Importing/Indexing database (MySQL or SQL Server) in Solr using Data Import Handler
Install Solr
download and install Solr from http://lucene.apache.org/solr/.
you can access Solr admin from your browser: http://localhost:8983/solr/
use the port number used in installation.
MySQL connector
@manishnakar
manishnakar / Solr-dataimport
Last active June 16, 2017 13:09
Solr Datahandler
# manish
[program:email-over-queue]
process_name=%(program_name)s_%(process_num)02d
command=php /var/www/laravel-social-email-authentication/artisan queue:work redis --queue=social --sleep=3 --tries=3
autostart=true
autorestart=true
user=forge
numprocs=2
redirect_stderr=true
stdout_logfile=/var/www/laravel-social-email-authentication/storage/logs/supervisord.log
@manishnakar
manishnakar / datatables serverside
Created June 1, 2017 08:11
datatables on serverside
/*
* Route::get( 'api/v1/teams-table', 'APIController@teamsTable' );
*/
public function dataTable() {
// get the input parameters
$i = Input::all();
// parse the parameters and set default values
$draw = isset( $i[ 'draw' ] ) ? $i[ 'draw' ] : 1;
$start = isset( $i[ 'start' ] ) ? $i[ 'start' ] : 0;
@manishnakar
manishnakar / download excel
Created May 24, 2017 11:19
Excel Download and upload
use Input;
use App\Item;
use DB;
use Excel;
class MaatwebsiteDemoController extends Controller
{
"private": true,
"scripts": {
"prod": "gulp --production",
"dev": "gulp watch"
},
"devDependencies": {
"clean-css": "^3.4.19",
"gulp": "^3.9.1",
"gulp-less": "^3.0.3",
'use strict';
var gulp = require('gulp');
var concat = require('gulp-concat');
var uglify = require('gulp-uglify');
var less = require('gulp-less');
var minify = require('gulp-minify');
var sourcemaps = require('gulp-sourcemaps');
var cleanCSS = require('gulp-clean-css');
var phpcs = require('gulp-phpcs');