All of the following information is based on go version go1.17.1 darwin/amd64.
| GOOS | Out of the Box |
|---|---|
aix |
✅ |
android |
✅ |
| # One liner | |
| wget --recursive --page-requisites --adjust-extension --span-hosts --convert-links --restrict-file-names=windows --domains yoursite.com --no-parent yoursite.com | |
| # Explained | |
| wget \ | |
| --recursive \ # Download the whole site. | |
| --page-requisites \ # Get all assets/elements (CSS/JS/images). | |
| --adjust-extension \ # Save files with .html on the end. | |
| --span-hosts \ # Include necessary assets from offsite as well. | |
| --convert-links \ # Update links to still work in the static version. |
| { | |
| "bindings": [ | |
| { | |
| "name": "inputBlob", | |
| "type": "blobTrigger", | |
| "dataType": "binary", | |
| "direction": "in", | |
| "path": "images-in/{name}", | |
| "connection": "function821251a1b074_STORAGE" | |
| }, |
| Source material: | |
| http://security.stackexchange.com/questions/24444/what-is-the-most-hardened-set-of-options-for-gcc-compiling-c-c | |
| https://wiki.gentoo.org/wiki/Hardened_Gentoo | |
| https://wiki.debian.org/Hardening | |
| ================================================================================================================> | |
| GCC Security related flags and options: | |
| CFLAGS="-fPIE -fstack-protector-all -D_FORTIFY_SOURCE=2" | |
| LDFLAGS="-Wl,-z,now -Wl,-z,relro" |
| #!/bin/bash | |
| # *As root* | |
| cd ~ | |
| killall caddy | |
| rm -rf ~/caddy | |
| mkdir caddy && cd caddy | |
| curl -SL 'https://caddyserver.com/download/build?os=linux&arch=amd64&features=hugo' > caddy.tgz | |
| tar xzf caddy.tgz |
| # Strong nginx config for SSL Labs rating A as of 3-2015 | |
| # Broad legacy compatibility including IE8, Android 2.3+, openssl 0.9.8 clients | |
| # Blocks most bot scan IP probes. | |
| # | |
| # *** Assumes: _HOSTNAME_ is replaced *** | |
| # *** Assumes: Diffie-Hellman parameters have been generated (see: dhparam below) | |
| # | |
| # Includes OCSP stapling, HSTS Strict Transport security, | |
| # session resumption, legacy backwards compatibility (XP, Android 2.3-4.3) | |
| # |
| #!/usr/bin/env bash | |
| # names of latest versions of each package | |
| export VERSION_PCRE=pcre-8.38 | |
| export VERSION_OPENSSL=openssl-1.0.2d | |
| export VERSION_NGINX=nginx-1.9.7 | |
| # URLs to the source directories | |
| export SOURCE_OPENSSL=https://www.openssl.org/source/ | |
| export SOURCE_PCRE=ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/ |
| # Compiled source # | |
| ################### | |
| *.com | |
| *.class | |
| *.dll | |
| *.exe | |
| *.o | |
| *.so | |
| # Packages # |
| /*! | |
| * gulp | |
| * $ npm install gulp-ruby-sass gulp-autoprefixer gulp-cssnano gulp-jshint gulp-concat gulp-uglify gulp-imagemin gulp-notify gulp-rename gulp-livereload gulp-cache del --save-dev | |
| */ | |
| // Load plugins | |
| var gulp = require('gulp'), | |
| sass = require('gulp-ruby-sass'), | |
| autoprefixer = require('gulp-autoprefixer'), | |
| cssnano = require('gulp-cssnano'), |
| /* | |
| Used like this: | |
| var regex = regex_escape([ | |
| 'foo', | |
| 'bar', | |
| 'http://example.com/page' | |
| ]); |