function Rotorcraft(rotorBlades) {
this.rotorBlades = rotorBlades;
}
Rotorcraft.prototype = {
start() {
BSD 3-Clause License | |
Copyright (c) 2020, Ben Spaulding | |
All rights reserved. | |
Redistribution and use in source and binary forms, with or without | |
modification, are permitted provided that the following conditions are met: | |
1. Redistributions of source code must retain the above copyright notice, this | |
list of conditions and the following disclaimer. |
- Edit the file at
/Library/Backblaze.bzpkg/bzdata/bzexcluderules_editable.xml
. - Add this rule inside the
bzexclusions
tag:
<!-- Exclude node_modules. -->
<excludefname_rule plat="mac" osVers="*" ruleIsOptional="t" skipFirstCharThenStartsWith="users/" contains_1="/node_modules/" contains_2="*" doesNotContain="*" endsWith="*" hasFileExtension="*" />
Sometimes getting caught up in the configuration of gunicorn or uWSGI with the configuration of nanobox can be confusing. If you are not getting what you expect, starting here can be a good way to know if you have ports configured properly.
When running nanobox run
remember that:
# Send nginx server port in host header to upstream only when port is non-standard. | |
# Requires nginx >= 0.9.0 | |
map $server_port $host_port { | |
default $:port; | |
80 ''; | |
443 ''; | |
} | |
server { | |
... |
These are works in progress, but they function for me and my uses.
Note that I wrote one in sh
and one in fish
just for exercise — the sh
one will work fine if you use fish
. The only time you need to pick one to match your own shell is if the files will be sourced, which is not yet supported.
Ideas
- Add a script to simply drop you into a shell on host machine with all these environment variables set. That would make it easier to run multiple commands.
- Add ability to source the files so the individual functions could be used in other places.
# This works on macOS, and on some Linux distros. If it is failing you may need | |
# to change the sed option `-E` to `-r`. | |
pipenv lock --requirements | sed -E 's/[[:space:]]+--hash=[a-z0-9]+:[a-z0-9]+//g' |
#!/usr/bin/env python3 | |
""" | |
Assign file types to be opened by a particular application. | |
Requires the ``duti`` program:: | |
> brew install duti | |
> ./appfiles.py --help | |
TODO |
The boxfile is simple, setting up only the bare minimum for this test. You will see that the engine is also very simple. I wanted one that didn’t do any magic or sniffing to install system or Python packages.
I wanted to see if I could put all the pip files and Python packages in a custom, cacheable location. For what it's worth, this all seems to work for me. You can run each command below to see the output. But I think, if this actually does work, all of these steps could be put in the Python engine.
>>> class Foo(object): | |
... # Immutable objects are fine as class attrs. | |
... mystr = 'a' | |
... myint = 1 | |
... mytpl = (1,) | |
... | |
... # But mutable objects often surprise you. | |
... mylst = [] | |
... mydct = {} | |
>>> foo = Foo() |