diff options
| author | Bryan Newbold <bnewbold@archive.org> | 2018-08-10 15:57:44 -0700 | 
|---|---|---|
| committer | Bryan Newbold <bnewbold@archive.org> | 2018-08-10 16:06:46 -0700 | 
| commit | 22c4f271e8d3f9d9e8b377838d885e4f65c7e356 (patch) | |
| tree | c26e139a147080da38054275c8d165ff640c101e | |
| parent | 7d059d109b0736075b8184a843c1c7811f8ec1a9 (diff) | |
| download | knowledge-22c4f271e8d3f9d9e8b377838d885e4f65c7e356.tar.gz knowledge-22c4f271e8d3f9d9e8b377838d885e4f65c7e356.zip | |
small software tweaks
| -rw-r--r-- | software/bash.page | 2 | ||||
| -rw-r--r-- | software/chromium.page | 13 | ||||
| -rw-r--r-- | software/python.page | 36 | ||||
| -rw-r--r-- | software/rust.page | 1 | 
4 files changed, 52 insertions, 0 deletions
| diff --git a/software/bash.page b/software/bash.page index 5c81d3f..0d5325b 100644 --- a/software/bash.page +++ b/software/bash.page @@ -42,3 +42,5 @@ life difficult. Sometimes `|| true` is enough to get around this.  Google has a style guide: https://google.github.io/styleguide/shell.xml  Shellcheck is a lint tool: https://www.shellcheck.net/ + +http://redsymbol.net/articles/unofficial-bash-strict-mode/ diff --git a/software/chromium.page b/software/chromium.page index 2212a20..9a88295 100644 --- a/software/chromium.page +++ b/software/chromium.page @@ -56,7 +56,20 @@ back so often and reaching for backspace is a pain::  Flash Block  -------------- +*Note: pretty sure this isn't necessary circa 2018)* +  I still use `flash block <http://www.chromeextensions.org/appearance-functioning/flashblock/>`_ to disable flash by default; an indicator pops up and I can   enable flash for an entire page which is nice for sites that have hidden flash  (like hulu). +Flags +------- + +- `#show-saved-copy`: enable primary +- `#pause-background-tabs`: enabled +- `#expensive-background-timer-throttling: enabled + +Opt-Outs +---------- + +- https://mouseflow.com/opt-out/ diff --git a/software/python.page b/software/python.page index deada7a..0fd2531 100644 --- a/software/python.page +++ b/software/python.page @@ -102,15 +102,21 @@ number (as an int).  RunSnakeRun  ------------- +Runsnake seems to be unmaintained... `snakeviz` is the new thing? +  Example session::      $ python -m cProfile -o ./dump.profile myscript.py --script-option blah      $ # run to completion or Ctrl-C, then      $ runsnakerun ./dump.profile +    # or +    $ snakeviz ./dump.profile  nosetests  ------------- +NOTE: by default I now use pytest instead of nose +  To do minimal tests without wrapping everything in a class, import assert  functions from nose.tools, eg:: @@ -169,3 +175,33 @@ To make Python 3.4 the default for `python` system-wide, do something like:  For an individual user you can also just create a `python` alias. See also:  http://linuxconfig.org/how-to-change-from-default-to-alternative-python-version-on-debian-linux + + +Nice Packages +-------------- + +subprocess/pexpect: https://github.com/kennethreitz/delegator.py + +time/datetime: https://github.com/crsmithdev/arrow + +tsv: https://github.com/kennethreitz/tablib + +simple HTML scraping: https://github.com/michaelhelmick/lassie + +sqlite3dbm is a library to back a python dict with sqlite3 on disk + + +pytest +----------- + +pytest sort of "just works" if you put test files under `./tests/`. If you want +crude file imports, skipping directories, and including `test_*` functions from +any python file (not just those with `test_*.py`, install `pytest-pythonpath` +and create a `pytest.ini` like: + +    [pytest] +    python_paths = . +    python_files = *.py +    norecursedirs = .svn _build tmp* + +Need to mock? <https://blog.fugue.co/2016-02-11-python-mocking-101.html> diff --git a/software/rust.page b/software/rust.page index af5ea3a..df99de4 100644 --- a/software/rust.page +++ b/software/rust.page @@ -5,6 +5,7 @@ Rust  - [http://xion.io/post/code/rust-iter-patterns.html]()  - [https://deterministic.space/rust-cli-tips.html]() +- [https://manishearth.github.io/blog/2018/01/10/whats-tokio-and-async-io-all-about/]()  Optimization: use `RUSTFLAGS="-C target-cpu=native"` to take advantage of CPU  special features. | 
