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.
# Edit this configuration file to define what should be installed on | |
# your system. Help is available in the configuration.nix(5) man page | |
# and in the NixOS manual (accessible by running ‘nixos-help’). | |
{ config, pkgs, ... }: | |
{ | |
imports = | |
[ # Include the results of the hardware scan. | |
./hardware-configuration.nix |
license: gpl-3.0 | |
height: 1030 | |
scrolling: yes |
Orthodox C++ (sometimes referred as C+) is minimal subset of C++ that improves C, but avoids all unnecessary things from so called Modern C++. It's exactly opposite of what Modern C++ suppose to be.
/* | |
* Usage: | |
* all LaTeX source files go in $rawDirectory | |
* base document to 'cook' should match content of $latexFile | |
* build script delivers resulting PDF file to $cookedDirectory | |
*/ | |
defaultTasks 'full' | |
ext { documentBase = 'myBaseLaTeXFileName' } |
# alias to edit commit messages without using rebase interactive | |
# example: git reword commithash message | |
reword = "!f() {\n GIT_SEQUENCE_EDITOR=\"sed -i 1s/^pick/reword/\" GIT_EDITOR=\"printf \\\"%s\\n\\\" \\\"$2\\\" >\" git rebase -i \"$1^\";\n git push -f;\n}; f" | |
# aliases to change a git repo from private to public, and public to private using gh-cli | |
alias gitpublic="gh repo edit --accept-visibility-change-consequences --visibility public" | |
alias gitprivate="gh repo edit --accept-visibility-change-consequences --visibility private" | |
# delete all your repos using gh-cli (please do not run this unless you want to delete all your repos) | |
gh repo list --limit 300 --json url -q '.[].url' | xargs -n1 gh repo delete --yes |
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
// groovy -cp $HOME/.m2/repository/com/h2database/h2/1.3.166/h2-1.3.166.jar groovySql | |
// http://groovy.codehaus.org/Tutorial+6+-+Groovy+SQL | |
// Grab will not load the driver! but at least we can trigger it to download it and then use groovy -cp option to run this script. | |
// @Grab('com.h2database:h2:1.3.166') | |
import groovy.sql.Sql | |
sql = Sql.newInstance( | |
'jdbc:h2:~/test', |