Skip to content

Instantly share code, notes, and snippets.

View sanjay1688's full-sized avatar

Sanjay Sahu sanjay1688

View GitHub Profile
@sanjay1688
sanjay1688 / Ubuntu server setup script (PHP 5.6)
Created January 11, 2017 16:49 — forked from Ravaelles/Ubuntu server setup script (PHP 5.6)
PHP 5.6 + nginx + MongoDB driver for PHP
#!/bin/bash
######################################################
### README ###########################################
######################################################
###
### One-line server install script for Ubuntu.
### Installs Nginx + PHP5.6 + MongoDB for PHP driver.
###
### Removes previous Apache, PHP, nginx installations.
@sanjay1688
sanjay1688 / installMongoDB.sh
Created January 11, 2017 16:39 — forked from ankur13secret/installMongoDB.sh
To install MongoDB in a server
#!/usr/bin/env bash
echo "Written By Ankur Mishra"
echo "Starting Server Setup....."
echo "Be Sure you are are a super user..."
# To become a super user
sudo su
# to update the packages from repositories
apt-get update
@sanjay1688
sanjay1688 / Mac development software cmds
Last active March 28, 2016 07:46
Programming Software Commnd ( install, remove, services, dependencies ) Mac Environment
############## BREW INSTALL ##############
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
To check brew install or not
brew doctor
Your system is ready to brew.
@sanjay1688
sanjay1688 / gist:96318232b77fd1b296bf
Last active May 26, 2017 11:14
Setting Up Node Application On Aws Ubuntu Server
############## UPDATE UBUNTU ##############
sudo local-gen UTF-8
sudo apt-get update
sudo apt-get upgrade
############## INSTALL NODE UBUNTU ##############
Rerefence : https://github.com/nodesource/distributions
# Using Ubuntu
curl -sL https://deb.nodesource.com/setup_4.x | sudo -E bash -
@sanjay1688
sanjay1688 / a.md
Last active November 20, 2015 08:40 — forked from danharper/a.md
Laravel Queue Supervisor

Install Supervisor with sudo apt-get install supervisor. Ensure it's started with sudo service supervisor restart.

In /etc/supervisord/conf.d/ create a .conf file. In this example, laravel_queue.conf (contents below). Give it execute permissions: chmod +x laravel_queue.conf.

This file points at /usr/local/bin/run_queue.sh, so create that file there. Give this execute permissions, too: chmod +x run_queue.sh.

Now update Supervisor with: sudo supervisorctl reread. And start using those changes with: sudo supervisorctl update.

@sanjay1688
sanjay1688 / multi-git.md
Created September 30, 2015 13:40 — forked from fitsanju/multi-git.md
Setting up a Github and Bitbucket account on the same computer.

Setting up github and bitbucket on the same computer

Github will be the main account and bitbucket the secondary.

Create SSH Keys

ssh-keygen -t rsa -C "github email"

Enter passphrase when prompted. If you see an option to save the passphrase in your keychain, do it for an easier life.

@sanjay1688
sanjay1688 / Kraken.php
Created December 26, 2014 08:09
My code
// php upload function
Array
(
[file] => /tmp/phpRZl57f
[wait] => 1
[lossy] => 1
[s3_store] => Array
(
@sanjay1688
sanjay1688 / noode js stuffs
Last active August 29, 2015 14:08
Node Js Commands / Stuffs
Installtion of node and express
apt-get install libssl-dev
download node source code
wget http://nodejs.org/dist/v0.6.19/node-v0.6.19.tar.gz
tar -vxf node-v0.6.19.tar.gz
go inside source code dir after run configure and build source code and install
cd /node-v0.6.19
1) ./configure
2) make
3) sudo make install
@sanjay1688
sanjay1688 / linux-cmds
Last active August 12, 2016 10:38
linux commands
################################# ALIAS ############################
To Make permanent add into
~/bashrc
To Make permanent global add into
/etc/bashrc
//create shortcuts
alias fit="cd /var/www/html/fit"
alias .="cd ../"
@sanjay1688
sanjay1688 / Elastic Search Command
Last active August 12, 2016 10:34
Elastic Search Command And Query Examples
curl -XDELETE http://domain:9200/index/type
http://domain/createmapping
http://domain/mongo2elastic/finder
################################################################################
FINDER SEARCH API