Skip to content

Instantly share code, notes, and snippets.

View sanjay1688's full-sized avatar

Sanjay Sahu sanjay1688

View GitHub Profile
@levabd
levabd / README.md
Last active January 23, 2017 05:42
Laravel 5.2 recipe for stack-updater

Simple Laravel 5.2 stack with web serer (php-fpm) and db drivers

  • NGINX
  • PHP7
  • PHP mongo driver for php-fpm and php-cli
  • PHP mbstring module
  • PHP bz2 module
  • PHP imagick module
  • Memcached + PHP memcached
  • Mysql PHP driver
@ankur13secret
ankur13secret / installMongoDB.sh
Last active July 14, 2018 02:43
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
@djonsson
djonsson / install_elasticsearch_osx.md
Last active June 12, 2025 07:13
OS X installation instructions for Elasticsearch + Kibana + Marvel

What is this?

Following this guide will set up a local Elasticsearch with Kibana and Marvel using Homebrew and Homebrew Cask

Prerequisites

If you already have Java installed on your system, skip steps Install Cask and Install Java

If you already have Java and Homebrew installed on your system, skip steps Prerequisites, start at Install Elasticsearch and Kibana after running $ brew update

Install Homebrew

  • $ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
@speaktoalvin
speaktoalvin / IAPHelper.txt
Last active April 29, 2021 04:07
In App Purchase in Swift, with Receipt Validation
import UIKit
import StoreKit
//MARK: SKProductsRequestDelegate
extension IAPHelpers : SKProductsRequestDelegate
{
func productsRequest(request: SKProductsRequest, didReceiveResponse response: SKProductsResponse)
{
@fitsanju
fitsanju / multi-git.md
Created September 30, 2015 13:36 — forked from rosswd/multi-git-win.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.

##################### Elasticsearch Configuration Example #####################
# This file contains an overview of various configuration settings,
# targeted at operations staff. Application developers should
# consult the guide at <http://elasticsearch.org/guide>.
#
# The installation procedure is covered at
# <http://elasticsearch.org/guide/en/elasticsearch/reference/current/setup.html>.
#
# Elasticsearch comes with reasonable defaults for most settings,
@DengoPHP
DengoPHP / subselect.php
Last active September 8, 2021 06:51
Laravel Eloquent with Subselect and Advanced Where
<?php
DB::table('rooms')
->whereNotIn('room_id', function($query)
{
$query->select('room_id')
->from(with(new Booking)->getTable())
->where(function($query)
{
$query->where('time_out', '<', '2012-09-14T18:00')
->orWhere('time_in', '>', '2012-09-21T09:00');
@WebPlatformDocs
WebPlatformDocs / ElasticSearch_backup.md
Last active August 29, 2015 14:07
ElasticSearch: Creating snapshot

Based on documentation from ElasticSearch about snapshots

To create backup with ElasticSearch

  1. Create on elasticsearch node a backup folder
    mkdir /srv/webplatform/elastic_backup
    chown -R elasticsearch:elasticsearch /srv/webplatform/elastic_backup
@sanjay1688
sanjay1688 / ubuntu development software cmds
Last active November 22, 2016 10:26
Programming Software Commnd ( install, remove, services, dependencies ) Ubuntu Enviroment
############## UPDATE UBUNTU ##############
sudo local-gen UTF-8
sudo apt-get update
sudo apt-get upgrade
############## GIT ##############
$ sudo add-apt-repository ppa:git-core/ppa
$ sudo apt-get update
<?
require("redis.php");
require("json.php");
$term = $_GET['term'];
$r = new Redis("127.0.0.1","6379");
$r->connect();
$items = $r->zrangebylex("kernel","[$term","[$term\xff",Array("LIMIT","0","10"));