scph5500.bin 26-Aug-2018 20:47 512.0K
scph5501.bin 26-Aug-2018 20:47 512.0K
scph5502.bin 26-Aug-2018 20:47 512.0K
scph5500.bin 26-Aug-2018 20:47 512.0K
scph5501.bin 26-Aug-2018 20:47 512.0K
scph5502.bin 26-Aug-2018 20:47 512.0K
| <div id="container" data-stuff="my variable"> | |
| <!-- This element's contents will be replaced with your component. --> | |
| </div> | |
| <script> | |
| window.test = "my react test"; | |
| window.dumbname = "martin" | |
| // notice that `stuff` is not passed directly, it is passed using `data-stuff="my variable"` through `container.dataset` | |
| </script> |
Editors like Illustrator can save out some really dumb SVG code sometimes. Properly optimized SVG files can be as much as 80% smaller. Bunches of empty groups, pointless attributes and many other inefficiencies decrease readability and reliability.
Every SVG file should be manually optimized in 3 passes using:
| /* FOR THE BROWSER | |
| Utility function to read a ND-JSON HTTP stream. | |
| `processLine` is a function taking a JSON object. It will be called with each element of the stream. | |
| `response` is the result of a `fetch` request. | |
| See usage example in the next file. | |
| */ | |
| const readStream = processLine => response => { | |
| const stream = response.body.getReader(); | |
| const matcher = /\r?\n/; |
| """ | |
| These functions take a dictionary of dependencies in the following way: | |
| depdict = { | |
| 'a' : [ 'b', 'c', 'd'], | |
| 'b' : [ 'c', 'd'], | |
| 'e' : [ 'f', 'g'] | |
| } | |
| has_loop() will check for dep loops in the dep dict with true or false. | |
| flatten() will create an ordered list of items according to the dependency structure. | |
| Note: To generate a list of dependencies in increasing order of dependencies, say for a build, run: flatten(MyDepDict) |
| <div id="errors" style=" | |
| background: #c00; | |
| color: #fff; | |
| display: none; | |
| margin: -20px -20px 20px; | |
| padding: 20px; | |
| white-space: pre-wrap; | |
| "></div> | |
| <div id="root"></div> | |
| <script> |
This answer is partially inspired by the post by @Saucier, but I was looking for an automated way to set user.name and user.email on a per repo basis, based on the remote, that was a little more light weight than the git-passport package that he developed. Also h/t to @John for the useConfigOnly setting. Here is my solution:
.gitconfig changes:
[github]
name = <github username>
email = <github email>
[gitlab]
name = <gitlab username>
email = <gitlab email>
In your ~/.ssh/config (if this file doesn't exist, just create it):
Host *.bitbucket.org
StrictHostKeyChecking noThis will turn it off for all hosts you connect to. You can replace the * with a hostname pattern if you only want it to apply to some hosts.
Make sure the permissions on the file restrict access to yourself only:
In this I will shortly describe how to setup
I used a docker-compose.yml file although I only created one container with no other dependencies.
This works with a regular Dockerfile as well.
$ uname -r