Skip to content

Instantly share code, notes, and snippets.

@cflems
cflems / aggressive_scrape.js
Created August 11, 2017 18:59
Obtain a local copy of any static website. Background images and some references may not work properly.
const http = require('http');
const https = require('https');
const fs = require('fs');
const path = require('path');
const url = require('url');
const exec = require('child_process').execSync;
const jq = require('jquery');
const jsdom = require('jsdom');
const SAVE_DIR = path.dirname(__filename)+'/scrape';
@cflems
cflems / hook.js
Last active August 16, 2017 17:13
// npm install githubhook
const githubhook = require('githubhook');
const exec = require('child_process').exec;
let config = {
ip: '0.0.0.0',
port: 1234,
url: '/push',
secret: 'whatever',
branch: 'master',