Skip to content

Instantly share code, notes, and snippets.

View t9toqwerty's full-sized avatar
🎯
Focusing

RAHUL K JHA t9toqwerty

🎯
Focusing
View GitHub Profile
@t9toqwerty
t9toqwerty / centos7.json
Created December 28, 2019 22:08
Packer Config For Centos7
{
"builders": [
{
"type": "vagrant",
"provider": "virtualbox",
"source_path": "centos7.box",
"communicator": "ssh",
"pause_before_connecting": "2m"
}
],
@t9toqwerty
t9toqwerty / Trie.java
Last active December 10, 2019 17:21
Trie Insertion, Search & Deletion
package app;
import java.util.ArrayList;
import java.util.Stack;
/**
* Trie
*/
public class Trie {
private TrieNode root;
@t9toqwerty
t9toqwerty / BinarySearchTree.java
Last active December 10, 2019 07:24
Binary Search Tree
package app;
public class BinarySearchTree {
BinaryTreeNode root;
public BinarySearchTree() {
this.root = null;
}
public void insert(int data) {
@t9toqwerty
t9toqwerty / BinaryTree.java
Last active December 10, 2019 07:25
Binary Tree Traversal Using Stack & Recursion
package com.company;
import java.util.Stack;
/**
* BinaryTree
*/
public class BinaryTree {
BinaryTreeNode root;
package app;
import java.util.Iterator;
import java.util.LinkedList;
/**
* Sorter
*/
public class Sorter {
public void radixSort(int[] nums) {
@t9toqwerty
t9toqwerty / app.js
Created December 19, 2018 20:18 — forked from ArVan/app.js
JWT Authentication with Passport
var express = require('express');
var path = require('path');
var favicon = require('serve-favicon');
var logger = require('morgan');
var cookieParser = require('cookie-parser');
var bodyParser = require('body-parser');
var index = require('./routes/index');
var user = require('./routes/user');
var auth = require('./routes/auth');
if($mobileNumber==8290238014){
Auth::login(User::find(1));
dump("Logged In User:". Auth::user()->id);
} else {
print_r("Not");
}
@t9toqwerty
t9toqwerty / app.py
Created August 30, 2018 21:32
Example Dialogflow V2 Fullfillment Responder - Python Flask
import json
from flask import Flask, request, make_response
app = Flask(__name__)
@app.route('/')
def hello_world():
return 'Hello World!'
//Single Promise Object
new Promise((resolve, reject) => {
// Your Code which you are unsure about execution time duration.
resolve();//OR reject();
})
.then(() => {
//If resolve()
console.log('Do this');
})
this.$nextTick(function () {
if (_.isObject(this.summaryTable)) {
this.summaryTable.destroy();
}
this.summaryTable =
$("#retailer-retention-table").DataTable({
searching: false,
ordering: false,
info: false,