Não use UUID
como PK nas tabelas do seu banco de dados.
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
kind create cluster --name demo-cluster | |
kind get clusters | |
kubectl config get-contexts |
So there were a few threads going around recently about a challenge to write the longest sequence of keywords in Javascript:
- https://twitter.com/bterlson/status/1093624668903268352
- https://news.ycombinator.com/item?id=19102367
There are, however, a few problems:
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
FROM node:10 | |
ENV NODE_ENV=development | |
WORKDIR /app | |
COPY package.json package-lock.json ./ | |
RUN npm install | |
COPY . ./ | |
RUN npm run build | |
FROM node:10 | |
ENV NODE_ENV=production |
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
module.exports = { | |
projects: [ | |
{ | |
displayName: 'dom', | |
testEnvironment: 'jsdom', | |
snapshotSerializers: ['enzyme-to-json/serializer'], | |
testMatch: ['**/__tests__/**/*.test.js?(x)'] | |
}, | |
{ | |
displayName: 'node', |
- Assert
- Calling
assert.fail()
with more than one argument is deprecated. [70dcacd710
] - Calling
assert.ok()
with no arguments will now throw. [3cd7977a42
] - Calling
assert.ifError()
will now throw with any argument other thanundefined
ornull
. Previously the method would throw with any truthy value. [e65a6e81ef
] - The
assert.rejects()
andassert.doesNotReject()
methods have been added for working with async functions. [599337f43e
]
- Calling
- Async_hooks
- Older experimental async_hooks APIs have been removed. [
1cc6b993b9
]
- Older experimental async_hooks APIs have been removed. [
- Buffer
- Early work by Ihab Awad (Google) and Kris Kowal (FastSoft)
- 2009-09: 2nd draft of module strawman, still very close to "closures as modules",
export x = 42
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 createObservable(observable, { onGet, onSet }) { | |
const interceptor = { | |
get(target, key, receiver) { | |
onGet(key) | |
return target[key] | |
}, | |
set(target, prop, value) { | |
onSet(prop, value) | |
return true | |
} |
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
// anywhere | |
import proxyquire from '....../proxyquire.js' | |
// proxyquire.js | |
// use rewiremock to mock proxyquire | |
import rewiremock, { addPlugin, plugins, overrideEntryPoint } from 'rewiremock'; | |
import stackTrace from 'stack-trace'; | |
rewiremock.requireActual('babel-register'); |
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
## Generate a key | |
# openssl rand -base64 741 > mongodb-keyfile | |
## Create k8s secrets | |
# kubectl create secret generic mongo-key --from-file=mongodb-keyfile | |
--- | |
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: mongo | |
labels: |
NewerOlder