- Clear feature ownership
- Module usage predictibility (refactoring, maintainence, you know what's shared, what's not, prevents accidental regressions, avoids huge directories of not-actually-reusable modules, etc)
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Hello World!</title> | |
<link rel="stylesheet" type="text/css" href="./styles.css"> | |
</head> | |
<body> | |
<script> | |
require('./renderer.js') |
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
Some Jenkinsfile examples |
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 { URI } from '@vscode/monaco-editor/esm/vs/base/common/uri'; | |
import { ITextModelContentProvider } from '@vscode/monaco-editor/esm/vs/editor/common/services/resolverService'; | |
import { ApolloClient } from 'apollo-client'; | |
import { IModelService, IModeService } from '@workbench-stack/core'; | |
import { ILanguageSelection } from '@vscode/monaco-editor/esm/vs/editor/common/services/modeService'; | |
// import { IFileDataSubscription } from '@files-stack/client-state'; | |
import gql from 'graphql-tag'; | |
export const FileContent_WsDocument = gql` | |
query aQuery { |
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
test('test rxjs marble', async () => { | |
const testScheduler = new TestScheduler((actual, expected) => { | |
expect(actual).toEqual(expected); | |
}); | |
const fetchUserEpic = (action$, state$, { getJSON }) => action$.pipe( | |
ofType('FETCH_USER'), | |
mergeMap(action => | |
getJSON(`https://api.github.com/users/${action.id}`).pipe( | |
map(response => ({ type: 'FETCH_USER_FULFILLED', response })) |
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 gql from 'graphql-tag'; | |
import 'jest'; | |
import { createTestClient } from 'apollo-server-testing'; | |
import { InMemoryCache } from 'apollo-cache-inmemory'; | |
import { ApolloServer } from 'apollo-server'; | |
/** | |
* Server side graphql test uses createTestClient from | |
* https://github.com/apollographql/apollo-server/blob/master/packages/apollo-server-testing/src/createTestClient.ts |
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 { ApolloClient } from 'apollo-client'; | |
import { InMemoryCache } from 'apollo-cache-inmemory'; | |
import { withClientState } from 'apollo-link-state'; | |
import { ApolloLink } from 'apollo-link'; | |
import gql from 'graphql-tag'; | |
import 'jest'; | |
describe('Apollo Client tests', () => { |
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
vscode uses its own DI. | |
https://github.com/Microsoft/vscode/issues/4274 | |
https://github.com/joelday/decoration-ioc |
From Meteor's documentation:
In Meteor, your server code runs in a single thread per request, not in the asynchronous callback style typical of Node. We find the linear execution model a better fit for the typical server code in a Meteor application.
This guide serves as a mini-tour of tools, trix and patterns that can be used to run async code in Meteor.
Sometimes we need to run async code in Meteor.methods
. For this we create a Future
to block until the async code has finished. This pattern can be seen all over Meteor's own codebase:
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
#!/usr/bin/env sh | |
# http://stackoverflow.com/a/30819570/187663 | |
ffmpeg -i $1 -i $1 -filter_complex "[0:v]scale=-1:720[scaled_video];[1:v]scale=1280:720,boxblur=16[blur_image];[blur_image][scaled_video]overlay=(main_w-overlay_w)/2:(main_h-overlay_h)/2[outv]" -c:v libx264 -aspect 1280/720 -map [outv] -map 0:a -c:a copy $1.fixed.mp4 |
NewerOlder