Skip to content

Instantly share code, notes, and snippets.

View harry1989's full-sized avatar

Sriharsha Sistalam harry1989

View GitHub Profile
javascript:(function() {
if(!window.your_bookmarklet) {
var doc = document,
js = doc.createElement('script');
js.type = 'text/javascript';
js.src = 'loader.js';
js.async = true;
@harry1989
harry1989 / Gender pronoun git hook
Last active October 13, 2015 09:13
This git hook checks for the existence of gender pronouns in the commit message and aborts the commit if it finds one
#!/bin/env node
/**
* This scripts check of the existence of gender pronouns
* and aborts the commit if any of them are found
*
* Don't consider it as silly, because its really 'NOT!'.
* One of the core contributor of libuv had to depart since didn't
* accept a PR related to gender pronoun fix, so think
* carefully before using gender pronouns
@harry1989
harry1989 / Go merge alternate
Last active April 7, 2016 06:35
This program demonstrate how we can merge two channels alternatively
package main
import (
"fmt"
"sync")
func printEvenNumbers(ch chan int){
for i:=2; i<=45; i=i+2 {
ch<-i;
}
Map<Positon, Long> positionProb;
List<Position> finalReachableCells;
List<Position> visitedCells;
/**
* Class to represent the positon
*/
class Positon {
int x;
int y;