Writing a PWA with Aurelia
I feel like Progressive Web Application (PWA for short) are a more and more popular way to build mobile apps. That's understandable since you can use the same technology you use to build a SPA to build one! So …
I feel like Progressive Web Application (PWA for short) are a more and more popular way to build mobile apps. That's understandable since you can use the same technology you use to build a SPA to build one! So …
On my spare time, I am developing a board game that uses the Aurelia framework. I currently manage the state in a service without any dedicated state management solutions (like RxJS, Aurelia store, Redux, …). And I feel I am reaching to the limit of what I can do with it …
Some time ago, I wanted to add some tests (behavior and render) on an Aurelia component that uses the i18n plugin and more precisely the df attribute in the view to display a localized date.
Since it was a while back (I wanted to write it earlier but couldn't), my …
If you use Aurelia with the i18n plugin, you will have to maintain JSON files that will map a translation key to an actual translation. Manually editing the file to add/remove keys can be tedious.
Luckily, keys can be extracted automatically thanks to i18next-scanner. It can extract translation keys …
Put the style in this media query:
@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) { // Put CSS here }
Add PYTHONUNBUFFERED=1 in run config or .env (only use .env if you use the plugin). This is meant to immediately view the output …
Use this at the top of all your Bash scripts to avoid problems:
# Exit on error. set -e # Don't allow undefined variable. set -u # Make pipeline fail if any command in it fail. set -o pipefail
See this article.
By default there is no editor on Heroku. To get one, you can use the heroku-nano plugin like this (or by installing as a plugin):
mkdir bin cd bin curl https://github.com/Ehryk/heroku-nano/raw/master/heroku-nano-2.5.1/nano.tar.gz --location --silent > nano.tar …
Use the snippet below to capture and inspect the certificates of a distant site and its chain with requests.
import requests HTTPResponse = requests.packages.urllib3.response.HTTPResponse orig_HTTPResponse__init__ = HTTPResponse.__init__ def new_HTTPResponse__init__(self, *args, **kwargs): orig_HTTPResponse__init__(self, *args, **kwargs …