Skip to content

Instantly share code, notes, and snippets.

View neomatrix369's full-sized avatar
馃幆
Focusing

mani neomatrix369

馃幆
Focusing
View GitHub Profile
@neomatrix369
neomatrix369 / SimpleBarGraph.r
Created October 18, 2013 16:44
R Script to display a simple bar graph
> counts <- table(mtcars$vs, mtcars$gear)
> par(bg = "white");
> barplot(counts, main="Car Distribution by Gears and VS",
xlab="Number of Gears", col=c("darkblue","maroon"),
legend = rownames(counts), beside=TRUE)
@neomatrix369
neomatrix369 / RLogger.r
Created October 18, 2013 16:34
R script - basic logging functions [Refactored]
MSG_TYPE_INFO <- "[INFO]"
MSG_TYPE_WARNING <- "[WARNING]"
MSG_TYPE_DEBUG <- "[DEBUG]"
MSG_TYPE_ERROR <- "[ERROR]"
log.ANY <- function(typeOfMessage, message) {
print(paste(date(), typeOfMessage, message))
}
log.INFO <- function(message) {
@neomatrix369
neomatrix369 / RLogger.r
Created October 18, 2013 16:33
R script - basic logging functions [Unrefactored]
log.INFO <- function(message) {
print(paste(date(), "[INFO]", message))
}
log.WARNING <- function(message) {
print(paste(date(), "[WARNING]", message))
}
log.DEBUG <- function(message) {
print(paste(date(), "[DEBUG]", message))
@neomatrix369
neomatrix369 / SonarQube-Runner-output.txt
Created September 16, 2013 15:43
SonarQube Runner output
SonarQube Runner 2.3
Java 1.7.0_25 Oracle Corporation (64-bit)
Mac OS X 10.8.5 x86_64
INFO: Runner configuration file: /opt/sonar-runner-2.3/conf/sonar-runner.properties
INFO: Project configuration file: /Users/manisarkar/bn_projects/TimelineJS/sonar-project.properties
INFO: Default locale: "en_US", source code encoding: "UTF-8"
INFO: Work directory: /Users/manisarkar/bn_projects/TimelineJS/.sonar
INFO: SonarQube Server 3.7
14:11:20.927 INFO - Load batch settings
.
@neomatrix369
neomatrix369 / SonarQube-maven-projects.txt
Created September 16, 2013 15:41
SonarQube output when run via the maven
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 29.923s
[INFO] Finished at: Fri Sep 13 18:07:01 BST 2013
[INFO] Final Memory: 62M/247M
[INFO] ------------------------------------------------------------------------
[INFO] [18:07:01.557] Execute org.apache.maven.plugins:maven-surefire-plugin:2.10:test done: 20372 ms
[INFO] [18:07:01.557] Execute maven plugin maven-surefire-plugin done: 20373 ms
.
@neomatrix369
neomatrix369 / settings.xml
Last active May 5, 2020 08:39
settings.xml for SonarQube to be placed into the $HOME/.m2 folder (maven's configuration folder)
<settings>
<profiles>
<profile>
<id>sonar</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<!-- Example for MySQL-->
<sonar.jdbc.url>
@neomatrix369
neomatrix369 / gist:6159068
Last active December 20, 2015 16:09
13 habits to good TDD programming "refactored to" 12 habits to good TDD programming
1) Write a failing test
2) Write the simplest code to pass the test
3) Refactor to remove duplications
4) Write the assertion first and work backwards
5) See the test fail
6) Write meaningful tests
7) Triangulate
8) Keep your test and model code separate
9) Isolate your tests
10) Organise your tests to reflect model code
@neomatrix369
neomatrix369 / gist:6017864
Created July 17, 2013 05:15
Building gs-collections using JDK 1.8.0-ea
$ mvn clean package
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=128m; support was removed in 8.0
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO]
[INFO] Goldman Sachs Collections Code Generator
[INFO] Goldman Sachs Collections Code Generator Ant Task
[INFO] Goldman Sachs Collections Code Generator Maven Plugin
[INFO] Goldman Sachs Collections API
@neomatrix369
neomatrix369 / gist:6004332
Created July 15, 2013 23:15
Building dispruptor under JDK 1.8.0-ea
:compileJava UP-TO-DATE
:processResources UP-TO-DATE
:classes UP-TO-DATE
:jar
:javadoc/home/saiubuntu/git-repos/disruptor/src/main/java/com/lmax/disruptor/util/Util.java:128: warning: no description for @param
* @param buffer
^
/home/saiubuntu/git-repos/disruptor/src/main/java/com/lmax/disruptor/dsl/Disruptor.java:106: error: self-closing element not allowed
* <p/>
^
@neomatrix369
neomatrix369 / gist:6004008
Created July 15, 2013 22:18
Building MutabilityDetector4FIndBugs using JDK 1.8.0-ea
$ mvn clean package
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=128m; support was removed in 8.0
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for org.mutabilitydetector:MutabilityDetector4FindBugs:jar:0.3-SNAPSHOT
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-gpg-plugin is missing. @ line 88, column 15
[WARNING] 'build.plugins.plugin.version' for org.codehaus.mojo:build-helper-maven-plugin is missing. @ line 70, column 15
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]