Add this file to your AI assistant's system prompt or context to help it avoid common AI writing patterns. Source: tropes.fyi by ossama.is
We are trying to combine the idea of SWR ("stale-while-revalidate") and React Suspense together, and this write-up covers all our findings from this journey.
When React Hooks launched, people started to rely on useEffect to initiate data fetching:
function User () {TypeScript and Playground練習問題集更新情報
WIP
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
| export class AwesomeCounter extends HTMLElement { | |
| constructor() { | |
| super(); | |
| this.attachShadow({mode: 'open'}); | |
| this.state = {}; | |
| } | |
| connectedCallback() { | |
| this.setState({count: 0}); |
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
| // ==UserScript== | |
| // @name Youtube:floating transcript | |
| // @namespace http://efcl.info/ | |
| // @description apply panel floating | |
| // @include https://www.youtube.com/watch?v=* | |
| // @version 1 | |
| // @grant none | |
| // ==/UserScript== | |
| // Usage: Open Transcript panel | |
| // -> next transcript |
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
| /** | |
| * ================== angular-ios9-uiwebview.patch.js v1.1.1 ================== | |
| * | |
| * This patch works around iOS9 UIWebView regression that causes infinite digest | |
| * errors in Angular. | |
| * | |
| * The patch can be applied to Angular 1.2.0 – 1.4.5. Newer versions of Angular | |
| * have the workaround baked in. | |
| * | |
| * To apply this patch load/bundle this file with your application and add a |
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
| # Visual Studio Code | |
| # https://code.visualstudio.com/Docs/setup | |
| function vsc { | |
| if [[ $# = 0 ]] | |
| then | |
| open -a "Visual Studio Code" | |
| else | |
| local argPath="$1" | |
| [[ $1 = /* ]] && argPath="$1" || argPath="$PWD/${1#./}" | |
| open -a "Visual Studio Code" "$argPath" |
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
| fizz = function f() { | |
| fizz = function () { | |
| fizz = function () { | |
| fizz = f | |
| return "Fizz" | |
| } | |
| } | |
| } | |
| buzz = function f() { |
NewerOlder
