Skip to content

Instantly share code, notes, and snippets.

View neomatrix369's full-sized avatar
🎯
Focusing

mani neomatrix369

🎯
Focusing
View GitHub Profile
@neomatrix369
neomatrix369 / Collection of JVM flags.md
Last active July 18, 2023 22:49
Collection of HotSpot JVM flags for various purposes (mainly performance related)
0xf6135a4598782bb2a263281fc5f8520b8760f385
Transformation Priority Premise
({}–>nil) no code at all->code that employs nil
(nil->constant)
(constant->constant+) a simple constant to a more complex constant
(constant->scalar) replacing a constant with a variable or an argument
(statement->statements) adding more unconditional statements.
(unconditional->if) splitting the execution path
(scalar->array)
(array->container)
@neomatrix369
neomatrix369 / gist:aad1b372109b423e3290
Created June 14, 2015 13:16
Handy rysnc examples
rsync -vpcrazh --progress [source folder] [destination folder]
or
rsync --verbose --perms --checksum --recursive --archive --compress --human-readable --progress [source folder] [destination folder]
-v, --verbose increase verbosity
-p, --perms preserve permissions
-c, --checksum skip based on checksum, not mod-time & size
@neomatrix369
neomatrix369 / InterestingFiles Interesting files and folders in OpenJDK9 (jigsaw)
Created November 20, 2014 22:09
Interesting files and folders in OpenJDK9 (jigsaw)
$ tree -fL 2 build
build
└── build/linux-x86_64-normal-server-release
β”œβ”€β”€ build/linux-x86_64-normal-server-release/bootcycle-spec.gmk
β”œβ”€β”€ build/linux-x86_64-normal-server-release/build.log
β”œβ”€β”€ build/linux-x86_64-normal-server-release/build.log.old
β”œβ”€β”€ build/linux-x86_64-normal-server-release/buildtools
β”œβ”€β”€ build/linux-x86_64-normal-server-release/compare.sh
β”œβ”€β”€ build/linux-x86_64-normal-server-release/config.h
β”œβ”€β”€ build/linux-x86_64-normal-server-release/config.log
@neomatrix369
neomatrix369 / Build JBoss Forge on m2 (Jigsaw)
Last active August 29, 2015 14:09
Build JBoss Forge on m2 (Jigsaw)
$ gedit .bashrc
$ export SOURCE_CODE=$HOME/dev/jigsaw
$ export JAVA_HOME=$SOURCE_CODE/m2/build/linux-x86_64-normal-server-release/images/jdk
Ensure -XX:MaxPermSize=128m is removed from MAVEN_OPTS or any other XXX_OPTS env variables
git clone https://github.com/forge/core.git forge-core
Change the $HOME/.m2/settings.xml file
<settings>
@neomatrix369
neomatrix369 / gist:10940661
Created April 16, 2014 22:58
Parameterized Mocks example
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.Mock;
import org.mockito.Mockito;
import org.mockito.runners.MockitoJUnitRunner;
@RunWith(MockitoJUnitRunner.class)
public class ParameterizedMocks {
@Mock
private UserService userService;
@neomatrix369
neomatrix369 / betterrev.feature
Created February 9, 2014 08:18
Feature: Update local repo on the Betterrev server with changesets from the OpenJDK mercurial repos
Feature: Update local repo on the Betterrev server with changesets from the OpenJDK mercurial repos
As the Adopt OpenJDK user (on the Betterrev server)
I would like to retrieve changesets from the OpenJDK mercurial repos into my local repos
So that my local repos are always in sync with the OpenJDK mercurial repos
Core
====
Scenario: Script to connect to the OpenJDK mercurial repos is available
Given (the actor) is running and has the necessary configuration in place
@neomatrix369
neomatrix369 / GradientDescent.r
Created November 10, 2013 00:11
Gradient descent in R (using the cost function)
assertThat <- function(actualValue, expectedValue) {
if (as.character(actualValue) == as.character(expectedValue)) {
print("TEST PASSED: actual and expected values match.")
} else {
print("TEST FAILED: actual and expected values do not match.")
}
}
is <- function(value) {
return(value)
@neomatrix369
neomatrix369 / Advance3DMesh.r
Created October 18, 2013 16:45
An advance 3D mesh - R Script
> x <- seq(0,10,length=250);
> y <- x <- seq(-3,3, length=50);
> f <- function(x,y) { return (dnorm(x) * dnorm(y))};
> z <- outer(x,y,f);
> par(bg = "white");
> persp(x,y,z,zlim=c(0,0.25), theta=50, phi=10);