#Quick Guide
sudo atsutil databases -remove
atsutil server -shutdown
atsutil server -ping
#Extended Guide from http://doc.extensis.com/Font-Management-in-OSX-Best-Practices-Guide.pdf
| // Retry with backoff | |
| // Adapted from http://blog.danlew.net/2016/01/25/rxjavas-repeatwhen-and-retrywhen-explained/ | |
| Observable | |
| .range(start: 1, count: 10) | |
| .doOn(onNext: { i in | |
| if i == 5 { | |
| throw NSError(domain: "com.example", code: 1, userInfo: ["any": "thing"]) | |
| } | |
| }) | |
| .retryWhen { (attempts: Observable<ErrorType>) -> Observable<Int64> in |
#Quick Guide
sudo atsutil databases -remove
atsutil server -shutdown
atsutil server -ping
#Extended Guide from http://doc.extensis.com/Font-Management-in-OSX-Best-Practices-Guide.pdf
File > New > Project...
Create a Package.swift file in your root project directory, add dependencies, then run swift package fetch on the command line in the same directory. We’re not going to run swift build because it will just complain.
| #!/bin/bash | |
| ################################################################################ | |
| # Script for installing Odoo V10 on Ubuntu 16.04, 15.04, 14.04 | |
| # Author: Yenthe Van Ginneken | |
| # Adjusted: Ray Carnes | |
| # Assumes you already have an Ubuntu user called "odoo" with a home folder | |
| #------------------------------------------------------------------------------- | |
| # Make a new file: | |
| # sudo nano odoo-install.sh | |
| # Place this content in it and then make the file executable: |
FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.
| # Root. | |
| $ docker exec -u 0 i -t {container_id/image_name} bash | |
| or | |
| # Default container's user. | |
| $ docker exec i -t {container_id/image_name} bash |
| /* | |
| * Handling Errors using async/await | |
| * Has to be used inside an async function | |
| */ | |
| try { | |
| const response = await axios.get('https://your.site/api/v1/bla/ble/bli'); | |
| // Success 🎉 | |
| console.log(response); | |
| } catch (error) { | |
| // Error 😨 |