Skip to content

Instantly share code, notes, and snippets.

View FlamingTempura's full-sized avatar

Peter West FlamingTempura

View GitHub Profile
@FlamingTempura
FlamingTempura / gist:3809f1ed6a2abc002df4
Created March 14, 2015 17:59
Archive a Simple Machines Forum (SMF) to html using wget
wget -m -np -a example.com_$(date +%Y%m%d).log -e robots=off -nv --adjust-extension --convert-links --page-requisites --reject-regex='(\?action=mlist|\?action=help|\?action=search|\?action=login|\?action=dlattach|\?action=reminder|\?action=register|\?action=credits|\?action=who|\?action=recent|\?action=celendar|\?action=stats|\?action=printpage|\?action=verificationcode|\.msg|sort[,=].+|prev_next[,=].+|wap2|action=\.xml|PHPSESSID)' http://example.com/
@FlamingTempura
FlamingTempura / gist:e7387470586382b841b0
Created March 14, 2015 18:20
Archive phpbb to html using wget
wget -m -np -a example.com_$(date +%Y%m%d).log -e robots=off -nv --adjust-extension --convert-links --page-requisites --reject-regex='(\?p=|&p=|mode=reply|view=|mode=post|mode=email|mode=quote|mode=newtopic|login.php|search.php|feed.php)' --keep-session-cookies --load-cookies=cookie http://example.com/
@FlamingTempura
FlamingTempura / gist:a3b71e69c6d81852c1ab
Created March 14, 2015 18:21
Archive wordpress to html using wget
wget -m -np -a example.com_$(date +%Y%m%d).log -e robots=off -nv --adjust-extension --convert-links --page-requisites http://example.com
@FlamingTempura
FlamingTempura / build.js
Created December 22, 2019 23:17
Making a binary from Node.js scripts
const { spawn } = require('child_process');
const path = require('path');
const fs = require('fs');
const ROOT_DIR = __dirname;
const OUTPUT_DIR = path.join(__dirname, 'bin'); // where the binary should end up
const OUTPUT = path.join(OUTPUT_DIR, 'my_program'); // name of the binary
const BUILD_DIR = path.join(__dirname, 'build'); // location for temporary build files
const MAIN = 'your-code.js'; // the entrypoint to your code
const INCLUDE = [