This gist is an example of how you can simply install and run and extended Postgres using docker-compose. It assumes that you have docker and docker-compose installed and running on your workstation.
- Requires
dockeranddocker-compose - Clone via http:
git clone https://gist.github.com/b0b7e06943bd389560184d948bdc2d5b.git - Make
load-extensions.shexecutable - Build the image:
docker-compose build
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 request = require('request'); | |
| const cheerio = require('cheerio'); | |
| const fs = require('fs'); | |
| const writeStream = fs.createWriteStream('post.csv'); | |
| // Write Headers | |
| writeStream.write(`Title,Link,Date \n`); | |
| request('http://codedemos.com/sampleblog', (error, response, html) => { | |
| if (!error && response.statusCode == 200) { |
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
| /* bling.js */ | |
| const $ = document.querySelector.bind(document); | |
| const $$ = document.querySelectorAll.bind(document); | |
| Node.prototype.on = window.on = function (name, fn) { | |
| this.addEventListener(name, fn); | |
| } | |
| NodeList.prototype.__proto__ = Array.prototype; |
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000