Skip to content

Instantly share code, notes, and snippets.

View NISH1001's full-sized avatar
💭
Staring into the abyss...

Nish NISH1001

💭
Staring into the abyss...
View GitHub Profile
@NISH1001
NISH1001 / gist:4d0236442a3cf101b34c
Created December 14, 2015 12:58 — forked from evildmp/gist:3094281
Set up Django, nginx and uwsgi

This document has now been incorporated into the uWSGI documentation:

http://uwsgi-docs.readthedocs.org/en/latest/tutorials/Django_and_nginx.html

Set up Django, nginx and uwsgi

Steps with explanations to set up a server using:

@NISH1001
NISH1001 / cvim
Last active March 9, 2016 13:34
cvim configurations
set smoothscroll
set ignorecase
set smartcase
set regexp
set incsearch
set showtabindices
set noautofocus
map H gT
map L gt
@NISH1001
NISH1001 / combination problem
Created March 14, 2016 07:38
A simple combination problem that is all the possible combinations of given numbers that result in a given sum (repetition allowed)
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Combination</title>
</head>
@NISH1001
NISH1001 / vim-on-heroku.sh
Created May 23, 2017 10:53 — forked from naaman/vim-on-heroku.sh
vim on heroku
#!/usr/bin/env bash
mkdir vim
curl https://s3.amazonaws.com/heroku-vim/vim-7.3.tar.gz --location --silent | tar xz -C vim
export PATH=$PATH:/app/vim/bin
@NISH1001
NISH1001 / 8_puzzle.py
Last active July 4, 2017 04:02
8 puzzle solver using DFS
#!/usr/bin/env python3
def swap(l, i, j):
m = l[::]
m[i], m[j] = l[j], l[i]
return m
class Puzzle:
def __init__(self, initial_state=[0, 1, 3, 2, 4, 8, 5, 6, 7], goal_state=[1, 2, 3, 4, 5, 6, 7, 8, 0]):
if len(initial_state) != len(goal_state):
@NISH1001
NISH1001 / sudokusolver.cpp
Created July 6, 2017 03:22
Solve sudoku using backtracking
#include <iostream>
#include <vector>
#include <cmath>
//just for unassigned location
enum
{
UNASSIGNED = 0,
};
@NISH1001
NISH1001 / SalesforceBulkAPIClient.java
Created October 6, 2017 06:36
bulk api for salesforce
package salesforceintegration.salesforce.salesforceclient;
import java.io.IOException;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.apache.http.HttpEntity;
import org.apache.http.ParseException;
import org.apache.http.client.methods.CloseableHttpResponse;
@NISH1001
NISH1001 / spark-tutorial-links
Last active November 23, 2017 10:32
Spark tutorials found in Github

Start Zookeeper Server

bin/zookeeper-server-start.sh config/zookeeper.properties 

Start Kafka Server

bin/kafka-server-start.sh config/server.properties