This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* eslint-disable no-console */ | |
| /*** | |
| * This is a little server that emulates the protocol used by cloudflare's browser rendering API. In | |
| * local development, you can run this server, and connect to it instead of cloudflare's (strictly | |
| * limited) API. e.g. in your worker you might use a function like this: | |
| * | |
| * ```ts | |
| * import { Browser, launch as launchPuppeteer } from '@cloudflare/puppeteer' | |
| * function launchBrowser(env: Environment) { | |
| * if (env.LOCAL_BROWSER_ORIGIN) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const assert = require('assert'); | |
| /** | |
| * Helps you test network traffic with Playwright. | |
| * | |
| * - mockTraffic | |
| * - blockTraffic | |
| * - startRecordingTraffic | |
| * - seeTraffic | |
| * - dontSeeTraffic |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import * as http from 'http'; | |
| import * as https from 'https'; | |
| import got, { Got, ExtendOptions, Headers, CancelableRequest, Response } from 'got'; | |
| import CacheableLookup from 'cacheable-lookup'; | |
| import { decodeData, TypeOf, TSchema } from '../decoder'; | |
| export const DefaultHttpClientOptions = { | |
| keepAlive: true, | |
| maxSockets: 10, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| action_pool_depth | |
| Current value (from the default) = -1 | |
| From //build/toolchain/BUILD.gn:11 | |
| Pool for non goma tasks. | |
| added_rust_stdlib_libs | |
| Current value (from the default) = [] | |
| From //build/config/rust.gni:44 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| body, textarea, input, button { | |
| font-size: 11px; | |
| } | |
| a { | |
| color: green; | |
| } | |
| p>a { | |
| color: green !important; |
https://www.nerdfonts.com/font-downloads
The following solution thanks to @hackerzgz & @snacky101 will install all nerd fonts;
brew tap homebrew/cask-fonts
brew search '/font-.*-nerd-font/' | awk '{ print $1 }' | xargs -I{} brew install --cask {} || trueThis is a cheat sheet for how to perform various actions to ZSH, which can be tricky to find on the web as the syntax is not intuitive and it is generally not very well-documented.
| Description | Syntax |
|---|---|
| Get the length of a string | ${#VARNAME} |
| Get a single character | ${VARNAME[index]} |
Here we want to scrape product name, price and rating from ebay product pages:
url = 'https://www.ebay.com/itm/Sony-PlayStation-4-PS4-Pro-1TB-4K-Console-Black/203084236670'
wanted_list = ['Sony PlayStation 4 PS4 Pro 1TB 4K Console - Black', 'US $349.99', '4.8']
scraper.build(url, wanted_list)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [alias] | |
| ci = commit | |
| co = checkout | |
| cm = checkout master | |
| cb = checkout -b | |
| st = status -sb | |
| sf = show --name-only | |
| lg = log --pretty=format:'%Cred%h%Creset %C(bold)%cr%Creset %Cgreen<%an>%Creset %s' --max-count=30 | |
| incoming = !(git fetch --quiet && git log --pretty=format:'%C(yellow)%h %C(white)- %C(red)%an %C(white)- %C(cyan)%d%Creset %s %C(white)- %ar%Creset' ..@{u}) | |
| outgoing = !(git fetch --quiet && git log --pretty=format:'%C(yellow)%h %C(white)- %C(red)%an %C(white)- %C(cyan)%d%Creset %s %C(white)- %ar%Creset' @{u}..) |
NewerOlder