Skip to content

Instantly share code, notes, and snippets.

View prameshbajra's full-sized avatar
💻
Let's talk tech.

Pramesh Bajracharya prameshbajra

💻
Let's talk tech.
View GitHub Profile
@prameshbajra
prameshbajra / gist:660d16319d333b856324c972938be163
Created August 3, 2017 16:03
Let's customize window's command prompt a bit.
// Type the following into your cmd
setx PROMPT $p$s$s$c$s$d$s$f$s:$_$c$$$f-$g$s
@prameshbajra
prameshbajra / cloudSettings
Created September 14, 2017 14:17
Visual Studio Code Settings Sync Gist
{"lastUpload":"2017-09-14T14:17:12.462Z","extensionVersion":"v2.8.3"}
@prameshbajra
prameshbajra / circularlinkedlist.c
Created June 5, 2018 13:41
By - Pavan Yekabote
#include<stdio.h>
#include<stdlib.h>
struct nde {
int data;
struct nde *link;
};
typedef struct nde* Node;
@prameshbajra
prameshbajra / circularlinkedlist.java
Created June 5, 2018 13:43
By - Pramesh Bajracharya
package com.demo.advjava;
public class CircularLinkedList {
Node head;
class Node {
int data;
Node next;
@prameshbajra
prameshbajra / N queens Solution.java
Last active June 6, 2018 13:38
NQueens - My solution
package com.demo.advjava;
public class NQueensTesting {
int boardSize = 8;
int[][] board = new int[boardSize][boardSize];
public void populateBoard() {
int i, j;
for (i = 0; i < boardSize; i++)
@prameshbajra
prameshbajra / TypeFun.java
Created June 7, 2018 06:44
Open a preferred application and start typing automatically.
package com.demo.advjava;
import java.awt.AWTException;
import java.awt.Robot;
import java.awt.event.KeyEvent;
import java.io.IOException;
public class NotepadFun {
public static void main(String[] args) throws IOException, InterruptedException, AWTException {
Runtime.getRuntime().exec("gedit");
@prameshbajra
prameshbajra / AdjMatGraph.java
Created June 7, 2018 08:59
Adjaceny Matric Implementation for Graph in JAVA.
package com.demo.advjava;
public class GraphImplementationAdjMat {
int[][] graph;
public GraphImplementationAdjMat(int vertices) {
graph = new int[vertices][vertices];
}
@prameshbajra
prameshbajra / Diamond.java
Created June 7, 2018 13:20
Diamond Pattern in java.
package com.demo.advjava;
public class StarsPattern {
public static void main(String[] args) {
printStars90(10);
printStarsRev(10);
// printStarsRev(10);
printStars(10);
}
@prameshbajra
prameshbajra / shareNode.js
Last active June 8, 2018 12:36
Share files locally in very high speed.
const cluster = require('cluster');
if (cluster.isMaster) {
cluster.fork();
cluster.on('exit', function(worker, code, signal) {
cluster.fork();
});
}