A guide to setup your WSL with Hyper and zsh
- Follow the very thorough instructions here
- Download Hyper.js here - I went with the 'hyperblue' theme.
| import functools | |
| def decorator(function): | |
| """A general decorator function""" | |
| @functools.wraps(function) | |
| def wrapper(*args, **kwargs): | |
| # Write decorator function logic here | |
| # Before function call |
| const { | |
| html, | |
| render, | |
| useState, | |
| useEffect, | |
| useLayoutEffect | |
| } = await import('https://unpkg.com/htm/preact/standalone.module.js'); | |
| const { |
This has been incorporated in a small library.
You often have several docker containers and applications which work together in the locel development environment. You need the following communications:
You have a way to connect localhost-to-docker using -p (port-mapping) docker option.
For instance, you can start PostgreSQL container using -p 0.0.0.0:5432:5432 and then connect like to normal PostgreSQL
You have often several docker containers and applications which work together on local development. You need the following communications:
You have a way to connect localhost-to-docker using -p (port-mapping) docker option.
For instance, you can start PostgreSQL container using -p 0.0.0.0:5432:5432 and then connect like to normal PostgreSQL
| # All units in usecs (µsec) comparing Python 2.7 | 3.7. | |
| # Last updated: 2019-02-11 | |
| # MacBook Pro (15-inch, 2016) | |
| # macOS 10.14.3 | |
| # 2.7 GHz Intel Core i7 | |
| # 16 GB 2133 MHz LPDDR3 | |
| python -m timeit "200 <= 250 < 300" # 0.0354 | 0.059 | |
| python2.7 -m timeit "250 in xrange(200, 300)" # 1.25 |