This file contains hidden or 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
require('babel-core/register'); | |
var babel = require('babel-core'); | |
var gulp = require('gulp'); | |
var speckjs = require('speckjs'); | |
var tape = require('tape'); | |
var through = require('through2'); | |
function requireFromBuffer(buffer) { | |
var m = new module.constructor(); | |
m.paths = module.paths; |
This file contains hidden or 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
// ./app/Dockerfile | |
FROM node:4.1.0 | |
WORKDIR /src/app | |
ADD package.json package.json | |
RUN npm install |
This file contains hidden or 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
var http = require('http'); | |
var Rx = require('rx'); | |
function observableServer(server) { | |
return Rx.Observable.fromEventPattern( | |
server.addListener.bind(server, 'request'), | |
server.removeListener.bind(server, 'request'), | |
(req, res) => ({req, res}) | |
).takeUntil(Rx.Observable.fromEvent(server, 'close')); | |
} |
This file contains hidden or 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 http = require('http'); | |
const fs = require('fs'); | |
const path = require('path'); | |
const url = require('url'); | |
const PORT = 8000; | |
http.createServer((req, res) => { | |
const pathname = url.parse(req.url).pathname; | |
const isStaticFile = !!path.extname(pathname); | |
const filePath = path.join(__dirname, isStaticFile ? path.join('static', pathname) : 'views/index.html'); |
This file contains hidden or 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 http = require('http'); | |
const fs = require('fs'); | |
const path = require('path'); | |
const PORT = 8000; | |
const filePath = path.join(__dirname, 'index.html'); | |
http.createServer((req, res) => { | |
res.writeHead(200, {'Content-Type': 'text/html'}); | |
fs.createReadStream(filePath) | |
.on('data', data => res.write(data)) |
This file contains hidden or 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
''' | |
Follow these steps to configure the webhook in Slack: | |
1. Navigate to https://<your-team-domain>.slack.com/services/new | |
2. Search for and select "Incoming WebHooks". | |
3. Choose the default channel where messages will be sent and click "Add Incoming WebHooks Integration". | |
4. Copy the webhook URL from the setup instructions and use it in the next section. |
This file contains hidden or 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 = { | |
cmd: 'nave use 7 bash -c "sh lambci_test.sh"' | |
} |
This file contains hidden or 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 { createElement } from 'react'; | |
import { compose } from 'ramda'; | |
import { lifecycle, withProps } from 'recompose'; | |
const enhance = compose( | |
lifecycle({ componentDidMount() { | |
this.refs.node.scrollIntoView({block: 'end', behavior: 'smooth'}); | |
} }), | |
withProps({ ref: 'node' }), | |
); |
This file contains hidden or 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/bash | |
# stop running containers | |
docker ps -q | xargs docker stop | |
# force remove all containers | |
docker ps -a -q | xargs docker rm -f | |
# force remove all untagged images | |
docker images -q --filter dangling=true | xargs docker rmi -f |
This file contains hidden or 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/bash | |
# Chrome DevTools debug, | |
# a reverse-proxy NodeJS Docker container | |
# | |
# Example docker-compose file | |
# | |
# version: "3" | |
# services: | |
# proxy: |
OlderNewer