git bisect - это мощный инструмент, который помогает найти точный коммит, где была введена ошибка, используя бинарный поиск.
- Запустите процесс bisect:
git bisect start
| import * as fs from 'fs'; | |
| import * as path from 'path'; | |
| const cssDir = 'src'; | |
| const outputFile = 'src/vars.css'; | |
| const hexRegex = /#([a-fA-F0-9]{3,6})/g; | |
| const rgbRegex = /rgb\(\s*\d+\s*,\s*\d+\s*,\s*\d+\s*\)/g; | |
| const rgbaRegex = /rgba\(\s*\d+\s*,\s*\d+\s*,\s*\d+\s*,\s*\d*\.?\d+\s*\)/g; |
| # Sometimes when you run sorry-cypress | |
| # and have misconfigured UI which has | |
| # http://localhost:4000 as baseUrl for API backend | |
| # and need to create new project ASAP | |
| # without digging into docs and sources | |
| curl 'http://<your_ip_address>:4000/' \ | |
| -H 'sec-ch-ua: "Google Chrome";v="105", "Not)A;Brand";v="8", "Chromium";v="105"' \ | |
| -H 'accept: */*' \ | |
| -H 'Referer: http://<your_ip_address>:8080/' \ |
| class Router { | |
| constructor({ | |
| pages, | |
| rootSelector | |
| }) { | |
| this.pages = pages; | |
| this.rootSelector = rootSelector; | |
| this.initRouting(); | |
| } |
| /** | |
| * Helper function to get image type based on starting bytes of the image file. | |
| */ | |
| function getImageType(content) { | |
| // Classify the contents of a file based on starting bytes (aka magic number: | |
| // https://en.wikipedia.org/wiki/Magic_number_(programming)#Magic_numbers_in_files) | |
| // This aligns with TensorFlow Core code: | |
| // https://github.com/tensorflow/tensorflow/blob/4213d5c1bd921f8d5b7b2dc4bbf1eea78d0b5258/tensorflow/core/kernels/decode_image_op.cc#L44 | |
| if (content.length > 3 && content[0] === 255 && content[1] === 216 && | |
| content[2] === 255) { |
npm install -g npm to update npm to the latest versionNow you can use npm and node from windows cmd or from bash shell like Git Bash of msysgit.
git log --graph --oneline --decorate ( git fsck --no-reflog | awk '/dangling commit/ {print $3}' )This will show you all the commits at the tips of your commit graph which are no longer referenced from any branch or tag – every lost commit, including every stash commit you’ve ever created, will be somewhere in that graph.
| import { serve } from "https://deno.land/[email protected]/http/server.ts"; | |
| const s = serve({ port: 8000 }); | |
| console.log("http://localhost:8000/"); | |
| for await (const req of s) { | |
| req.respond({ body: "Hello World\n" }); | |
| } |
Eric Bidelman has documented some of the common workflows possible with headless Chrome over in https://developers.google.com/web/updates/2017/04/headless-chrome.
If you're looking at this in 2016 and beyond, I strongly recommend investigating real headless Chrome: https://chromium.googlesource.com/chromium/src/+/lkgr/headless/README.md
Windows and Mac users might find using Justin Ribeiro's Docker setup useful here while full support for these platforms is being worked out.