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 |
| /* | |
| * 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" | |
| # release alias with tagging | |
| # usage: git release v2.3.0 "Finalized API and added documentation" ./docs.zip | |
| release = !f() { tag="$1"; title="$2"; shift 2; gh release create "$tag" --target $(git rev-parse HEAD) -t "$title" --generate-notes "$@"; }; f | |
| # usage gh lockdown | |
| # git alias to disable wikis, issues, projects for existing repos |
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', |