Real unit test (isolation, no children render)
Calls:
- constructor
- static getDerivedStateFromProps
When you look up how to compile swift faster for debug builds, people very earnestly give advice that seems contradictory: you should "try using the whole module optimization flag," and also "never use whole module optimization for debugging". [^1]
This is confusing because some of us are using these two general words:
compilation: "turning text into an executable program"
| #!/usr/bin/bash | |
| putsc() { | |
| echo -en "\e[34m :: \e[0m $@" | |
| } | |
| putscl() { | |
| putsc "$@\n" | |
| } |
This gist will show how to setup Raspbian Stretch as a headless Bluetooth A2DP audio sink. This will allow your phone, laptop or other Bluetooth device to play audio wirelessly through a Rasperry Pi.
A quick search will turn up a plethora of tutorials on setting up A2DP on the Raspberry Pi. However, I felt this gist was necessary because this solution is:
| Notes to make IR shield (made by LinkSprite) work in Raspberry Pi 3 (bought from Amazon [1]). | |
| The vendor has some documentation [2] but that is not complete and sufficient for Raspbian Stretch. | |
| Following are the changes that I made to make it work. | |
| $ sudo apt-get update | |
| $ sudo apt-get install lirc | |
| # Add the following lines to /etc/modules file | |
| lirc_dev | |
| lirc_rpi gpio_in_pin=18 gpio_out_pin=17 |
| var inStr:String | |
| var outStr:String | |
| // bad IP-literal (there are no square brackets around the address) | |
| inStr = "2606:2800:220:1:248:1893:25c8:1946" | |
| outStr = inStr.addingPercentEncoding(withAllowedCharacters: .urlHostAllowed)! | |
| // outStr = "2606%3A2800%3A220%3A1%3A248%3A1893%3A25c8%3A1946" | |
| // valid IP-literal (there are square brackets around the address) | |
| inStr = "[2606:2800:220:1:248:1893:25c8:1946]" |