- JavaScript: Duck typing (“When I see a bird that walks like a duck and swims like a duck and quacks like a duck, I call that bird a duck.”)
- static type checking: check before compiling (String s = new String())
- dynamic type checking: check at runtime (s = "foo")
- strong type checking: "Zahl"+str(3)
- weak type checking: "Zahl"+3
- JavaScript chooses worst of both worlds: dynamic and weak
Improving heat management after macbookpro 2011 discrete GPU fix, also a script to automate part of the fix process
Taken from StackExchange
Thanks to LangLangC
Taken from StackExchange
Thanks to LangLangC
For temperature and other improvements see https://gist.github.com/cdleon/d16e7743e6f056fedbebc329333d79df
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # JavaScript Generators and Concurrency | |
| 1. Why generators are a nice fit for handling a coroutine (source/sink) | |
| 2. How we use generators in the Dashboard app | |
| 3. What generators can do to help wrangle async behavior | |
| Generators are functions that can be paused and resumed (think cooperative multitasking or coroutines) | |
| Pitch: |
PDXReactJS meetup / 13. Nov 2018 @benjamminj
We want to make complex problems simple, and solve them in ways we can extend on.
JavaScript v. ReasonML:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* Note, this is only for library interop code. This is *not* a good way to do things in pure Reason code. */ | |
| module type GeneratorType { | |
| type value('a); | |
| type t('a); | |
| type fn('a) = unit => t('a); | |
| let valueGet: value('a) => option('a); | |
| let doneGet: value('a) => bool; | |
• 5ffd57393a85553ab55b
• 5cd28e2a812e5c65c9f7320e0726da18
• b6a6676a84b51c8200d0673a5b4a87c5
The quotes on this page come from this deleted question on Stackoverflow:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # This can be useful to force the system to use only the integrated GPU at all times. | |
| # This only applies to modern AMD GPUs (using the AMDRadeon4000 series kernel extension or later). | |
| # Set mux to integrated Intel GPU | |
| sudo nvram fa4ce28d-b62f-4c99-9cc3-6815686e30f9:gpu-power-prefs=%01%00%00%00 | |
| # Option #1: Completely disable automatic graphics switching and any other GPUs | |
| sudo nvram boot-args="agc=-1" | |
| # Option #2: Disable just the AMD GPU framebuffer |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| on buildTitle(originalText) | |
| set normalizedText to my replace(originalText, ":", "-") | |
| set normalizedText to my replace(normalizedText, "|", "") | |
| set normalizedText to my replace(normalizedText, "{", "") | |
| set normalizedText to my replace(normalizedText, "}", "") | |
| set normalizedText to my replace(normalizedText, " ", "_") | |
| set normalizedText to my replace(normalizedText, "/", "_") | |
| set normalizedText to my replace(normalizedText, "\\", "_") | |
| set normalizedText to my replace(normalizedText, "*", "") | |
| set normalizedText to my replace(normalizedText, ".", "") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| Test environment: | |
| - node.js 10.5.0 | |
| - macOS 10.13.5 | |
| - MacBook Pro Late 2013 | |
| - Ramda 0.25.0 | |
| - RxJS 6.2.1 | |
| Results (Babel transpiled): |