Skip to content

Instantly share code, notes, and snippets.

View sureshg's full-sized avatar
🚀
☕️

Suresh sureshg

🚀
☕️
View GitHub Profile
@sureshg
sureshg / projectDependencyGraph.gradle
Created June 9, 2018 08:06
Gradle project dependency graph
task projectDependencyGraph {
doLast {
def dot = new File(rootProject.buildDir, 'project.dot')
dot.delete()
dot << 'digraph {\n'
dot << " graph [label=\"${rootProject.name}\\n \",labelloc=t,fontsize=30];\n"
dot << ' node [style=filled, fillcolor="#bbbbbb"];\n'
dot << ' rankdir=TB;\n'
@sureshg
sureshg / keybase.md
Created June 11, 2017 18:41
My Keybase Proof

Keybase proof

I hereby claim:

  • I am sureshg on github.
  • I am suresh (https://keybase.io/suresh) on keybase.
  • I have a public key ASD8u-c3VMPka4yOWW5gIiwIpdyKn01ITOTj-WRklYLQBAo

To claim this, I am signing this object:

@sureshg
sureshg / Glyphs.kt
Last active January 24, 2018 20:30
Glyphs
/**
* Glyph object provides Unicode glyphs as well as it's plain ASCII alternatives.
* All ASCII glyphs are guaranteed to be the same number of characters as the
* corresponding Unicode glyphs, so that they line up properly when printed on
* a terminal. The orginal data file is taken from "Dart term_glyph" project.
*
* @author Suresh
*
* @see https://github.com/dart-lang/term_glyph
*/
@sureshg
sureshg / JMM.java
Created June 12, 2016 21:51
Java Memory Model Tests
class DataRace {
// Make volatile
boolean ready = false;
int answer = 0;
void thread1() {
// Spin Lock
while(!ready);
assert answer == 42
}
@sureshg
sureshg / HeadlessBrowser.md
Last active August 29, 2015 14:13
Headless Browser on CentOS 6.5
# Installation Steps on CentOS 6.5
# --------------------------------

$ sudo su -
$ yum install xorg-x11-server-Xvfb
$ yum install firefox
$ yum install ImageMagick
$ dbus-uuidgen &gt; /var/lib/dbus/machine-id
@sureshg
sureshg / sl.go
Created September 21, 2014 23:47
Steam Locomotive in go - http://play.golang.org/p/NOycgN2i6b
package main
import (
"time"
"fmt"
"strings"
)
func main() {
p := [][][]string {