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> |
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
$ uname -r
// like typesafe-actions | |
export type AnyAction<T extends string, A> = A & { | |
type: T; | |
}; | |
export function createAction<T extends string, P, AC extends (...args: any[]) => AnyAction<T, P>>( | |
type: T, | |
map: AC | |
): AC & { type: T } { |