Skip to content

Instantly share code, notes, and snippets.

Avatar
🐢
Reviewing

Phil-Barber

🐢
Reviewing
View GitHub Profile
@willprice
willprice / .travis.yml
Last active Jul 25, 2021
How to set up TravisCI for projects that push back to github
View .travis.yml
# Ruby is our language as asciidoctor is a ruby gem.
lang: ruby
before_install:
- sudo apt-get install pandoc
- gem install asciidoctor
script:
- make
after_success:
- .travis/push.sh
env:
@nicolashery
nicolashery / example.js
Last active Mar 3, 2021
Combine a pipe of multiple Node.js streams into one stream
View example.js
var util = require('util')
, Transform = require('stream').Transform
, StreamCombiner = require('./streamcombiner');
var chunks1 = [];
var stream1 = new Transform();
var soFar = '';
stream1._transform = function(chunk, encoding, done) {
chunks1.push(chunk.toString());
var pieces = (soFar + chunk).split('\n');