Goals: Add links that are reasonable and good explanations of how stuff works. No hype and no vendor content if possible. Practical first-hand accounts of models in prod eagerly sought.
| // from the talk https://www.youtube.com/watch?v=PTE4VJIdHPg | |
| // futures | |
| future := make(chan int, 1) | |
| go func() {future <- process() }() | |
| result := <-future | |
| // async await | |
| c := make(chan int, 1) | |
| go func() { c <- process() }() // async | |
| v := <-c // await |
| """ | |
| Given a dictionary, transform it to a string. Then byte encode that string. Then base64 encode it and since this will go | |
| on a url, use the urlsafe version. Then decode the byte string so that it can be else where. | |
| """ | |
| data = base64.urlsafe_b64encode(json.dumps({'a': 123}).encode()).decode() | |
| # And the decode is just as simple... | |
| data = json.loads(base64.urlsafe_b64decode(query_param.encode()).decode()) | |
| # Byte encode the string, base64 decode that, then byte decode, finally transform it to a dictionary |
A quick guide on how to setup Node.js development environment.
nvm allows installing several versions of Node.js to the same system. Sometimes applications require a certain versions of Node.js to work. Having the flexibility of using specific versions can help.
Use these rapid keyboard shortcuts to control the GitHub Atom text editor on macOS.
I have moved this over to the Tech Interview Cheat Sheet Repo and has been expanded and even has code challenges you can run and practice against!
\
| /*------------------------------------------ | |
| Responsive Grid Media Queries - 1280, 1024, 768, 480 | |
| 1280-1024 - desktop (default grid) | |
| 1024-768 - tablet landscape | |
| 768-480 - tablet | |
| 480-less - phone landscape & smaller | |
| --------------------------------------------*/ | |
| @media all and (min-width: 1024px) and (max-width: 1280px) { } | |
| @media all and (min-width: 768px) and (max-width: 1024px) { } |
| /* Smartphones (portrait and landscape) ----------- */ | |
| @media only screen | |
| and (min-device-width : 320px) | |
| and (max-device-width : 480px) { | |
| /* STYLES GO HERE */ | |
| } | |
| /* Smartphones (landscape) ----------- */ | |
| @media only screen | |
| and (min-width : 321px) { |