This file contains 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
Capitalized, short (50 chars or less) summary | |
More detailed explanatory text, if necessary. Wrap it to about 72 | |
characters or so. In some contexts, the first line is treated as the | |
subject of an email and the rest of the text as the body. The blank | |
line separating the summary from the body is critical (unless you omit | |
the body entirely); tools like rebase can get confused if you run the | |
two together. | |
Write your commit message in the imperative: "Fix bug" and not "Fixed bug" |
This file contains 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
/** | |
* We often run into a problem with functions that select DOM nodes like | |
* `cy.get`, where in between the `cy.get` call and the next item in the chain, | |
* the DOM element that `cy.get` found ends up being removed from the DOM. This | |
* can affect code as simple as: | |
* | |
* cy.get('button').click(); | |
* | |
* When it fails sporadically, it uses the following error message: | |
* |
This file contains 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
" YouCompleteMe and UltiSnips compatibility, with the helper of supertab | |
" (via http://stackoverflow.com/a/22253548/1626737) | |
let g:SuperTabDefaultCompletionType = '<C-n>' | |
let g:SuperTabCrMapping = 0 | |
let g:UltiSnipsExpandTrigger = '<tab>' | |
let g:UltiSnipsJumpForwardTrigger = '<tab>' | |
let g:UltiSnipsJumpBackwardTrigger = '<s-tab>' | |
let g:ycm_key_list_select_completion = ['<C-j>', '<C-n>', '<Down>'] | |
let g:ycm_key_list_previous_completion = ['<C-k>', '<C-p>', '<Up>'] |
This file contains 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
react-with-styles (control) | Emotion | Treat | Linaria | ||
---|---|---|---|---|---|
Total Blocking Time (ms) | 276 | 189 (-87) | 122 (-154) | 144 (-132) | |
JS bundle size (KiB) | 666 | 677 (+11) | 581 (-85) | 596 (-70) | |
CSS bundle size (KiB) | 8 | 8 (+0) | 12 (+4) | 13 (+5) | |
Update layout tree count | 2.84 | 2.96 (+0.12) | 2.00 (-0.84) | 2.00 (-0.84) | |
Update layout tree duration (ms) | 7,594 | 3,225 (-4,369) | 3,313 (-4,281) | 3,380 (-4,214) | |
Composite layers count | 5.43 | 5.22 (-0.21) | 4.05 (-1.38) | 4.04 (-1.39) | |
Composite layers duration (ms) | 660 | 379 (-281) | 306 (-354) | 292 (-368) |
This file contains 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
import { Graph, Vertex, Tarjan } from '../tarjan'; | |
it('handles simple cases', () => { | |
const v0 = new Vertex('0'); | |
const v1 = new Vertex('1'); | |
const v2 = new Vertex('2'); | |
v0.connections.add(v1); | |
v1.connections.add(v2); |
This file contains 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
import * as ts_module from 'typescript/lib/tsserverlibrary'; | |
/** Log to the TS Server log */ | |
function log(info: ts.server.PluginCreateInfo, message: string) { | |
info.project.projectService.logger.info(`[My TS Server Plugin] ${message}`); | |
} | |
// https://github.com/microsoft/TypeScript/wiki/Writing-a-Language-Service-Plugin | |
export default function init({ typescript: ts }: { typescript: typeof ts_module }) { | |
return { |
This file contains 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
// See "Unbounded Spigot Algorithms for the Digits of Pi," by Jeremy Gibbons, | |
// Math. Monthly, April 2006, pages 318-328. | |
// Adapted from https://gustavus.edu/mcs/max/pi/ | |
let app; | |
let q = BigInt(1); | |
let r = BigInt(0); | |
let t = BigInt(1); | |
let k = BigInt(1); |
This file contains 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
import { storiesOf, action } from '@kadira/storybook'; | |
import { browserDLSExamples } from '../examples/allExamples'; | |
import fixtures from '../examples/fixtures'; | |
const { DLSExamples, DLSComponents } = browserDLSExamples(); | |
Object.entries(DLSExamples).forEach(([name, examplesFunc]) => { | |
let story = storiesOf(name, module); |
This file contains 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
#!/bin/sh | |
# Find directories that only contain a single .eslintrc file. | |
# Adapted from https://superuser.com/a/727070 | |
# Enable double glob to find hidden files | |
shopt -s dotglob | |
# Loop through every subdirectory. | |
# Currently need to tweak this line and run it for every level of directory |
This file contains 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
snippet me "module.exports" b | |
module.exports = ${1:`!p snip.rv = ''.join(x.title() for x in re.sub('\.js$', '', snip.basename or 'ModuleName').split('_'))`};$0 | |
endsnippet |
NewerOlder