Skip to content

Instantly share code, notes, and snippets.

View ahmetmircik's full-sized avatar

Ahmet Mircik ahmetmircik

  • Hazelcast
  • Istanbul
View GitHub Profile
@Test(timeout = 600_000)
public void testEpochConsumerSeesEpochBeforeObserverThread() {
try {
AtomicBoolean stop = new AtomicBoolean();
DummyContainer container = new DummyContainer();
List<Throwable> throwables = new CopyOnWriteArrayList<>();
Collection<Future<?>> bumpFutures = new LinkedList<>();
// [0, bumperIndex)
final int bumperIndex = THREADS - 1;
@ahmetmircik
ahmetmircik / x11_docker_mac.md
Created April 25, 2022 11:38 — forked from cschiewek/x11_docker_mac.md
X11 in docker on macOS

To forward X11 from inside a docker container to a host running macOS

  1. Install XQuartz: https://www.xquartz.org/
  2. Launch XQuartz. Under the XQuartz menu, select Preferences
  3. Go to the security tab and ensure "Allow connections from network clients" is checked.
  4. Run xhost + ${hostname} to allow connections to the macOS host *
  5. Setup a HOSTNAME env var export HOSTNAME=`hostname`*
  6. Add the following to your docker-compose:
 environment:
@ahmetmircik
ahmetmircik / diskchecker.pl
Created September 26, 2018 15:22 — forked from bradfitz/diskchecker.pl
diskchecker.pl
#!/usr/bin/perl
#
# Brad's el-ghetto do-our-storage-stacks-lie?-script
#
sub usage {
die <<'END';
Usage: diskchecker.pl -s <server[:port]> verify <file>
diskchecker.pl -s <server[:port]> create <file> <size_in_MB>
diskchecker.pl -l [port]