Skip to content

Instantly share code, notes, and snippets.

@bchetty
bchetty / java.gitignore
Created December 26, 2017 19:36
gitignore file for Java projects
#---------------------------------------#
# Project Ignores #
#---------------------------------------#
# Maven
target/
pom.xml.tag
pom.xml.releaseBackup
pom.xml.versionsBackup
pom.xml.next
import hudson.model.*
// For each project
for(item in Hudson.instance.items) {
// check that job is not building
if(!item.isBuilding()) {
println("Wiping out workspace of job "+item.name)
item.doDoWipeOutWorkspace()
}
else {
println("Skipping job "+item.name+", currently building")
@bchetty
bchetty / BS3-MediaQueries-Template.css
Created May 24, 2016 16:49
BS3 MediaQueries Template
/* Large desktops and laptops */
@media (min-width: 1200px) {
}
/* Landscape tablets and medium desktops */
@media (min-width: 992px) and (max-width: 1199px) {
}
@bchetty
bchetty / MathApp.java
Last active March 25, 2016 22:55
Guice Grapher Class
package com.chetty.client;
import java.io.File;
import java.io.IOException;
import java.io.PrintWriter;
import com.chetty.module.MathModule;
import com.google.inject.Guice;
import com.google.inject.Injector;
import com.google.inject.grapher.GrapherModule;
@bchetty
bchetty / PQueueTest.java
Created March 25, 2016 22:15
PQueueTest.java
import com.chetty.algos.data.Patient;
import java.util.Comparator;
import java.util.PriorityQueue;
/**
*
* @author Babji Prashanth, Chetty
*/
public class PQueueTest {
public static void main(String[] args) {
@bchetty
bchetty / Patient.java
Created March 25, 2016 22:11
Patient Model Class
/**
*
* @author Babji P, Chetty
*/
public class Patient {
private int id;
private String name;
private boolean emergencyCase;
public Patient(int id, String name, boolean emergencyCase) {
@bchetty
bchetty / PQTest.java
Last active March 25, 2016 22:19
PQTest.java
import java.util.Comparator;
import java.util.PriorityQueue;
/**
*
* @author Babji P, Chetty
*/
public class PQTest {
public static void main(String[] args) {
PriorityQueue<Integer> pQueue = new PriorityQueue<Integer>(10, new Comparator<Integer>() {
@bchetty
bchetty / Series.java
Created March 25, 2016 21:26
Highcharts Sample Model Class
package com.bchetty.charts.model;
import java.util.List;
/**
*
* @author Babji Prashanth, Chetty
*/
public class Series {
private String name;
@bchetty
bchetty / ChartController.java
Created March 25, 2016 21:25
Highcharts Chart Controller
package com.bchetty.charts.controller;
import com.bchetty.charts.model.Series;
import com.google.gson.Gson;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
/**