To setup your computer to work with *.test domains, e.g. project.test, awesome.test and so on, without having to add to your hosts file each time.
- Homebrew
- Mountain Lion -> High Sierra
| package main | |
| import ( | |
| "context" | |
| "flag" | |
| "log" | |
| "net/url" | |
| "time" | |
| "cloud.google.com/go/compute/metadata" |
| package main | |
| import ( | |
| "net/http" | |
| "compress/gzip" | |
| "io/ioutil" | |
| "strings" | |
| "sync" | |
| "io" | |
| ) |
| // Needs a running Chrome Headless, eg: | |
| // /Applications/Google\ Chrome\ Canary.app/Contents/MacOS/Google\ Chrome\ Canary --headless --remote-debugging-port=9222 https://chromium.org | |
| // Run with node, eg `node render.js output.html` | |
| const CDP = require('chrome-remote-interface'); | |
| const fs = require('fs') | |
| CDP((client) => { | |
| // Extract used DevTools domains. | |
| const {Page, Runtime} = client; |
| // Copyright (c) 2017 Ismael Celis | |
| // Permission is hereby granted, free of charge, to any person obtaining a copy | |
| // of this software and associated documentation files (the "Software"), to deal | |
| // in the Software without restriction, including without limitation the rights | |
| // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
| // copies of the Software, and to permit persons to whom the Software is | |
| // furnished to do so, subject to the following conditions: | |
| // The above copyright notice and this permission notice shall be included in all |
To setup your computer to work with *.test domains, e.g. project.test, awesome.test and so on, without having to add to your hosts file each time.