Skip to content

Instantly share code, notes, and snippets.

View vietj's full-sized avatar
🤖
Coding the Future

Julien Viet vietj

🤖
Coding the Future
View GitHub Profile
@vietj
vietj / StatementBenchmarks.java
Created November 8, 2019 18:14 — forked from mp911de/StatementBenchmarks.java
R2DBC Postgres benchmarks
/*
* Copyright 2019 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
private static long minusOneIfNotLongMax(long value) {
final long valueMinusOne = value - 1;
final long diffFromValue = value - Long.MAX_VALUE;
final long tmp = (diffFromValue - 1) >> 63;
final long mask = ((diffFromValue >> 63) ^ tmp) & tmp;
return (value & mask) | (valueMinusOne & (~mask));
}
@vietj
vietj / hsdis-elcapitan.sh
Created December 3, 2017 06:19 — forked from tinkerware/hsdis-elcapitan.sh
Build hsdis for JDK 1.8u92 on El Capitan
# You will need Mercurial; get it with `brew install hg`.
hg clone http://hg.openjdk.java.net/jdk8u/jdk8u
cd jdk8u
hg update jdk8u92-b14
chmod +x ./get_source.sh; ./get_source.sh
cd hotspot/src/share/tools/hsdis
wget http://ftp.heanet.ie/mirrors/gnu/binutils/binutils-2.26.tar.gz
tar -xzf binutils-2.26.tar.gz
make BINUTILS=binutils-2.26 ARCH=amd64
@vietj
vietj / TestNavigationServiceRebase.java
Created June 20, 2011 13:06 — forked from vstorm83/TestNavigationServiceRebase.java
TestNavigationServiceRebase - testConsistentStateAfterRebase
public void testConsistentStateAfterRebase() throws Exception
{
MOPService mop = mgr.getPOMService();
Site portal = mop.getModel().getWorkspace().addSite(ObjectType.PORTAL_SITE, "consistent_state_after_rebase");
Navigation def = portal.getRootNavigation().addChild("default");
def.addChild("a");
//
sync(true);