Setup RPi Zero W as a kiosk
- write
Raspbian Liteimage to a SD card - enable ssh
touch /boot/ssh
- setup WiFi
| export const h=(t,p,...c)=>({t,p,c,k:p&&p.key}) | |
| export const render=(e,d,t=d.t||(d.t={}),p,r,c,m,y)=> | |
| // arrays | |
| e.map?e.map((e,p)=>render(e,d,t.o&&t.o[p])): | |
| // components | |
| e.t.call?(e.i=render((render.c=e).t(Object.assign({children:e.c},e.p),e.s=t.s||{},t=> | |
| render(Object.assign(e.s,t)&&e,d,e)),t.i||d,t&&t.i||{}),d.t=t=e):( | |
| // create notes | |
| m=t.d||(e.t?document.createElement(e.t):new Text(e.p)), | |
| // diff props |
| <? | |
| // str_replace removes the JS part and makes it into a normal JSON file | |
| $followers=json_decode(str_replace('window.YTD.follower.part0 = ','',file_get_contents(__DIR__.'/followers.js')),true); | |
| echo "\n\n"; | |
| echo number_format(count($followers)).' followers'; | |
| echo "\n\n"; | |
| const bypass = [ | |
| // function names to avoid logging | |
| ]; | |
| const collapsed = [ | |
| // function names to groupCollapsed | |
| ]; | |
| module.exports = function(babel) { | |
| const { types: t } = babel; | |
| const wrapFunctionBody = babel.template(`{ |
I've designed a lot of RPC protocols in my career. One pattern that's worked well basically goes as follows:
// Client calls: print('Hello World\n')
-> [1, "print", "Hello World!\n"]
// Server sends return value (or lack of return vvalue)
<- [-1]
// Client calls: add(1, 2)
-> [2, "add", 1, 2]I heard some points of criticism to how React deals with reactivity and it's focus on "purity". It's interesting because there are really two approaches evolving. There's a mutable + change tracking approach and there's an immutability + referential equality testing approach. It's difficult to mix and match them when you build new features on top. So that's why React has been pushing a bit harder on immutability lately to be able to build on top of it. Both have various tradeoffs but others are doing good research in other areas, so we've decided to focus on this direction and see where it leads us.
I did want to address a few points that I didn't see get enough consideration around the tradeoffs. So here's a small brain dump.
"Compiled output results in smaller apps" - E.g. Svelte apps start smaller but the compiler output is 3-4x larger per component than the equivalent VDOM approach. This is mostly due to the code that is usually shared in the VDOM "VM" needs to be inlined into each component. The tr
Stealing an idea from ember's settled test helper.
Assuming these conditions are true in your unit tests -
fetchinvoices/123? in a URL like /assignments?showGrades=1.# portion of the URL. This is not available to servers in request.url so its client only. By default it means which part of the page the user should be scrolled to, but developers use it for various things.