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
function methodDecorator(target, name, descriptor) { | |
const method = descriptor.value; | |
descriptor.value = function (...args) { | |
method.apply(this, args); | |
return this; | |
}; | |
} | |
class Person { | |
isSignedIn = false; |
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 Records<Keys extends keyof JSX.IntrinsicElements = keyof JSX.IntrinsicElements> = { | |
[P in Keys]: CSSProperties & JSX.IntrinsicElements[P] & { tag: P; }; | |
}[Keys]; | |
const Box: FC<Records> = ({tag, children, ...rest}): JSX.Element => { | |
const {styles, attributes} = splitProps(rest); | |
const Tag = tag as string; | |
return <Tag style={styles} {...attributes}>{children}</Tag> | |
} |
This file has been truncated, but you can view the full file.
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
openssl-1.1.1/ 0000755 0000000 0000000 00000000000 13345734631 011704 5 ustar root root openssl-1.1.1/CONTRIBUTING 0000644 0000000 0000000 00000007043 13345734623 013543 0 ustar root root |
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 { useLayoutEffect } from 'react'; | |
import { debounce } from 'lodash'; | |
import { GridApi } from 'ag-grid-community'; | |
const events = [ | |
'firstDataRendered', | |
'gridSizeChanged', | |
'modelUpdated', | |
'viewportChanged', | |
]; |
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 { BehaviorSubject, Observable } from 'rxjs'; | |
import { | |
combineLatest, filter, map, scan, tap, | |
} from 'rxjs/operators'; | |
const scanResetPause = ($isBusy: Observable<boolean>) => { | |
return interval(2000).pipe( | |
scan((acc, value) => { | |
if (!isBusy$.getValue()) { | |
return { prevIsBusy: false, value }; |
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
interface WithId { | |
id: string | number; | |
} | |
type Transaction<T extends WithId = WithId> = T[]; | |
export class TransactionalCache<T extends WithId = WithId> { | |
private remove: T[]; | |
private update: T[]; | |
private add: T[]; |
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 {HubConnection} from '@microsoft/signalr'; | |
//payload can be a one off payload or a Subject | |
export const getSignalRStreamRx = (hubConnection: HubConnection, operation: string, payload: any) => new Observable(observer => { | |
const subscription = hubConnection.stream(observer, operation, payload); | |
return { | |
unsubscribe: () => { | |
subscription.unsubscribe(); | |
} |
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 {Repository, Branch, Enums, Cred} = require('nodegit'); | |
const {version} = require('./package.json'); | |
const branchName = `release-${version}`; | |
const run = async () => { | |
try { | |
const repo = await Repository.open('./'); | |
await repo.checkoutBranch('master'); |
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
write-host "`n ## ONBOARDING SCRIPTS ## `n" | |
$nodeJsVersion = "12.14.0" | |
$projectName = 'alpha'; | |
$gitUrl = "https://github.com/vladimir-ivanov/$projectName.git" | |
$installNode = $FALSE; | |
### CONFIGURATION | |
$rootDir = "C:\Development" |
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
--- | |
- name: This is a hello-world example | |
vars: | |
latest_version: "{{ version }}" | |
hosts: localhost | |
tasks: | |
- name: Create a file called '/tmp/testfile.txt' with the content 'hello world'. | |
copy: | |
content: hello worldn | |
dest: /tmp/text.txt |
NewerOlder