Skip to content

Instantly share code, notes, and snippets.

Coding fun stuff....

Jaskaranbir Dhillon Jaskaranbir

Coding fun stuff....
Block or report user

Report or block Jaskaranbir

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View ms-terminal-preferences.json
"globals": {
"alwaysShowTabs": true,
"copyOnSelect": false,
"defaultProfile": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",
"initialCols": 120,
"initialRows": 30,
"keybindings": [
{"keys": ["ctrl+shift+\\"], "command": "splitHorizontal"},
{"keys": ["ctrl+\\"], "command": "splitVertical"},
Jaskaranbir / Vagrantfile_hyper-v
Created Aug 17, 2019
Vagrantfile I use for Hyper-V
View Vagrantfile_hyper-v
# -*- mode: ruby -*-
# vi: set ft=ruby :
plugin_dependencies = [
# "vagrant-windows-hyperv"
# "vagrant-vbguest"
needsRestart = false
Jaskaranbir /
Created Nov 4, 2018 — forked from dpryden/
Example of a ClassLoader leak in Java
import java.nio.file.Files;
import java.nio.file.Paths;
import java.nio.file.Path;
* Example demonstrating a ClassLoader leak.
* <p>To see it in action, copy this file to a temp directory somewhere,
Jaskaranbir /
Last active Jun 26, 2019
Shell script to create GitHub releases with automatically generated changelogs (using github-changelog-generator).
# ===> Set these variables first
# Example: "Jaskaranbir/MyRepo"
# An automatic changelog generator
Jaskaranbir /
Created Sep 6, 2018
Git delete tags locally that do not exist on remote
git fetch --prune origin "+refs/tags/*:refs/tags/*"
View kafka_docker.yaml
version: '3'
image: wurstmeister/kafka
- zookeeper
Jaskaranbir /
Created Jul 27, 2017 — forked from bastman/
docker cleanup guide: containers, images, volumes, networks

Docker - How to cleanup (unused) resources

Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...

delete volumes

// see:

$ docker volume rm $(docker volume ls -qf dangling=true)
$ docker volume ls -qf dangling=true | xargs -r docker volume rm
Jaskaranbir /
Created Oct 17, 2016
JTextField extension with bunch of filtering stuff that might be useful sometime
import javax.swing.JTextField;
import javax.swing.event.UndoableEditEvent;
import javax.swing.event.UndoableEditListener;
import javax.swing.text.AbstractDocument;
import javax.swing.text.AttributeSet;
import javax.swing.text.BadLocationException;
import javax.swing.text.DocumentFilter;
import javax.swing.undo.CannotRedoException;
import javax.swing.undo.CannotUndoException;
import javax.swing.undo.UndoManager;
Jaskaranbir / Infi-Cont-Marquee.html
Created Jul 2, 2016
Inifinite Continuous Scrolling Marquee in CSS without any explicit framework
View Infi-Cont-Marquee.html
<div id="maindiv">
<!-- Need to have two divs with same content.
One div will translate completely out of parent and other div will fill the void till the transition for first div starts again. -->
<div id="div1">
&nbsp;Test-1 Test-2 Test-3 Test-4 Test-5 Test-6 Test-7 Test-8 Test-9 Test-10 Test-11
<div id="div2">
&nbsp;Test-1 Test-2 Test-3 Test-4 Test-5 Test-6 Test-7 Test-8 Test-9 Test-10 Test-11
Jaskaranbir / html_table_generator.js
Created May 17, 2016
To generate tabular grid in html using javascript
View html_table_generator.js
var body = window.document.getElementsByTagName('body')[0];
// Square Grid
(function genGrid(size) {
var table = document.createElement('table');
table.setAttribute('border', '2');
table.setAttribute('cellspacing', '0');
table.setAttribute('cellpadding', '40');
// This variable isn't required.
// Just exists to make this script code friendly so the grid size can be changed
You can’t perform that action at this time.