Thread pools on the JVM should usually be divided into the following three categories:
- CPU-bound
- Blocking IO
- Non-blocking IO polling
Each of these categories has a different optimal configuration and usage pattern.
Latency Comparison Numbers (~2012) | |
---------------------------------- | |
L1 cache reference 0.5 ns | |
Branch mispredict 5 ns | |
L2 cache reference 7 ns 14x L1 cache | |
Mutex lock/unlock 25 ns | |
Main memory reference 100 ns 20x L2 cache, 200x L1 cache | |
Compress 1K bytes with Zippy 3,000 ns 3 us | |
Send 1K bytes over 1 Gbps network 10,000 ns 10 us | |
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD |
# Credit http://stackoverflow.com/a/2514279 | |
for branch in `git branch -r | grep -v HEAD`;do echo -e `git show --format="%ci %cr" $branch | head -n 1` \\t$branch; done | sort -r |
Ctrl + Alt + Space
<!-- all you need to know about log levels src: https://i.stack.imgur.com/Z5mag.png --> | |
<?xml version="1.0" encoding="UTF-8"?> | |
<configuration> | |
<logger name="com.datastax.driver.core.QueryLogger.SLOW" level="DEBUG" /> | |
<appender name="console" class="ch.qos.logback.core.ConsoleAppender"> | |
<encoder> | |
<pattern> %d{yyyy-MM-dd HH:mm:ss.SSS} [%level] %msg %n</pattern> | |
</encoder> | |
</appender> |
brew options ffmpeg | |
brew install ffmpeg \ | |
--with-chromaprint \ | |
--with-fdk-aac \ | |
--with-fontconfig \ | |
--with-freetype \ | |
--with-frei0r \ | |
--with-game-music-emu \ | |
--with-libass \ |
# Image neeeds to have ssh-client | |
image: docker:git | |
services: | |
- docker:dind | |
stages: | |
- staging | |
before_script: | |
- docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN $CI_REGISTRY |
This can be used to retreive files/binaries/information from docker containers.
#!/bin/bash
set -Eeuo pipefail
mkdir ./binary || true
# build most recent docker image
#!/bin/bash | |
# | |
# Open new Terminal tabs from the command line | |
# | |
# Author: Justin Hileman (http://justinhileman.com) | |
# | |
# Installation: | |
# Add the following function to your `.bashrc` or `.bash_profile`, | |
# or save it somewhere (e.g. `~/.tab.bash`) and source it in `.bashrc` | |
# |
val scalacOptions = Seq( | |
"-encoding", | |
"utf-8", // Specify character encoding used by source files. | |
"-Ybackend-parallelism", // | |
"8", | |
"-explaintypes", // Explain type errors in more detail. | |
"-feature", // Emit warning and location for usages of features that should be imported explicitly. | |
"-unchecked", // Enable additional warnings where generated code depends on assumptions. | |
"-Xcheckinit", // Wrap field accessors to throw an exception on uninitialized access. | |
// "-Ymacro-annotations", // Enable support for macro annotations, formerly in macro paradise. |