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 stylex from '@stylexjs/stylex' | |
export default stylex.create({ | |
sr_only: { | |
position: 'absolute', | |
width: 1, | |
height: 1, | |
padding: 0, | |
margin: -1, | |
overflow: 'hidden', |
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
const header = | |
useLayers ? | |
'\n@layer ' + | |
grouped.map((_, index) => `priority${index + 1}`).join(', ') + | |
';\n' | |
: ''; | |
return useLayers ? | |
`@layer priority${index + 1}{\n${collectedCSS}\n}` | |
: collectedCSS; |
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
const exprs = | |
pathUtils.isTemplateLiteral(path) ? path.get('expressions') | |
: pathUtils.isTaggedTemplateExpression(path) ? | |
path.get('quasi').get('expressions') | |
: []; | |
// I would want that formated as: | |
const exprs = | |
pathUtils.isTemplateLiteral(path) ? | |
path.get('expressions') |
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
// @flow | |
type Range = { | |
start: number; | |
end: number; | |
+length: number; | |
}; | |
declare var Paragraph: TParagraph; |
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
// ==UserScript== | |
// @name Call Form Editable Still | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description Make all View Buttons Edit Buttons | |
// @author You | |
// @match https://ic.bdsmarketing.com/IC.DataCollection/HoursCollection.aspx* | |
// @grant none | |
// ==/UserScript== |
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
// ==UserScript== | |
// @name Call Form Editable Still | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description Make all View Buttons Edit Buttons | |
// @author You | |
// @match https://ic.bdsmarketing.com/IC.DataCollection/HoursCollection.aspx* | |
// @grant none | |
// ==/UserScript== |
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
type ITask<I: $ReadOnlyArray<mixed>, O> = { | |
(...r: I): ?O, | |
lastError?: Error | |
} | |
function task <I: $ReadOnlyArray<mixed>, O>(inner: (...r: I) => O): ITask<I, O> { | |
const wrapped: any = function wrapped() { | |
try { | |
return (inner: any).apply(this, arguments) | |
} catch (err) { |
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
type HOC<InjectedProps, ExtraProps, Args: $ReadOnlyArray<*>> = <D, P, C: React$Component<D, P, any>>( | |
component: Class<C>, | |
...rest: Args | |
) => Class<React$Component<D, $Diff<P, InjectedProps> & ExtraProps, any>>; | |
declare var injectName: HOC<{name: string}, {bla: Array<number>}, [string, number]>; | |
type Props = { | |
name: string, | |
age: number, |
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
// https://en.wikipedia.org/wiki/Skew_heap#Implementation | |
import Foundation | |
indirect enum SkewHeap<T> where T: Equatable, T: Comparable { | |
case Empty | |
case Node(T, SkewHeap<T>, SkewHeap<T>) | |
} | |
func singleton<T>(_ a: T) -> SkewHeap<T> where T: Equatable, T: Comparable { | |
return .Node(a, .Empty, .Empty) |
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
// @flow | |
/* | |
This magic type will give you the union of the types of all the values in an object type. | |
This is still far from a fully dynamic $PropertyType, but it's a lot better than just using `any` | |
*/ | |
/* | |
Link: | |
https://flow.org/try/#0C4TwDgpgBAJA8gIwFYQMbADwDUB8UC8UA3gNQDaA1hCAFxQDOwATgJYB2A5gLp1YC+AKFCQoAfRhYAhgBsArhHrYANFDh14yNJlx5CWIeGgSZ8xWtWb0uscbkKMAKhVwcAt8OiIkBYgKhQSVDo2WQBbBAgmJT8AhDpGVk5o-xJJOgQAewzpCEk2aMEBABM0aUkmaAA3cqhaWCk7M2RXAG4ACjqE9g4oAB8oTOzctj6oEPDIgEo3AHoZ9rqAQSYmSRAMcYimHEmoOagAURWMpgYACwyAdxHUE4r0aRAoM8iIATmF4LCt0a7OXf2RyYJ3OVxudy0j2er3e8w6XwmTABM0Ox1O9Au1ygtxWkKeLwqsM+AyyOTyyNRwPRmPBuIe+JhH3hDGY3QpQJBGLB2Ih9OhhKAA | |
*/ |
NewerOlder