- Install SQUID
apt-get install squid- Create an user
htpasswd -md /etc/squid3/users myuserlogin`| /** Pre requisites | |
| 1) Make an Alias to Chrome | |
| alias chrome="/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome" | |
| alias chrome-canary="/Applications/Google\ Chrome\ Canary.app/Contents/MacOS/Google\ Chrome\ Canary" | |
| 2) Make Sure yarn is installed (it caches packages so you don't have to download them again) | |
| `npm i yarn` | |
| 3) Use yarn to install dependencies: | |
| `yarn add lighthouse` |
apt-get install squidhtpasswd -md /etc/squid3/users myuserlogin`| import { createServer, request } from 'node:http'; | |
| import { connect } from 'node:net'; | |
| import { URL } from 'node:url'; | |
| // Create an HTTP tunneling proxy | |
| const proxy = createServer((req, res) => { | |
| res.writeHead(200, { 'Content-Type': 'text/plain' }); | |
| res.end('okay'); | |
| }); | |
| proxy.on('connect', (req, clientSocket, head) => { |
| import { DEFAULT_CIPHERS } from 'tls'; | |
| import https from 'https'; | |
| const shuffler = (a, b) => 0.5 - Math.random(); | |
| const defaultCiphers = DEFAULT_CIPHERS.split(':'); | |
| const shuffledCiphers = [ | |
| ...defaultCiphers.slice(0, 2).sort(shuffler), | |
| ...defaultCiphers.slice(3).sort(shuffler) | |
| ].join(':'); |
This helper waits for requests initiated by the action to finish. It is similar to waitUntil: 'networkidle' option, but is designed to work with any action, like click.
Example usage:
const waitForNetworkSettled = require('./networkSettled');
// Wait for network settled after navigation,| const pw = require('playwright'); | |
| const UserAgent = require('user-agents'); | |
| const uuid = require('uuid'); | |
| const tmp = require('tmp-promise'); | |
| const UINT32_MAX = (2 ** 32) - 1; | |
| const WEBGL_RENDERERS = ['ANGLE (NVIDIA Quadro 2000M Direct3D11 vs_5_0 ps_5_0)', 'ANGLE (NVIDIA Quadro K420 Direct3D9Ex vs_3_0 ps_3_0)', 'ANGLE (NVIDIA Quadro 2000M Direct3D9Ex vs_3_0 ps_3_0)', 'ANGLE (NVIDIA Quadro K2000M Direct3D11 vs_5_0 ps_5_0)', 'ANGLE (Intel(R) HD Graphics Direct3D9Ex vs_3_0 ps_3_0)', 'ANGLE (Intel(R) HD Graphics Family Direct3D9Ex vs_3_0 ps_3_0)', 'ANGLE (ATI Radeon HD 3800 Series Direct3D9Ex vs_3_0 ps_3_0)', 'ANGLE (Intel(R) HD Graphics 4000 Direct3D11 vs_5_0 ps_5_0)', 'ANGLE (Intel(R) HD Graphics 4000 Direct3D11 vs_5_0 ps_5_0)', 'ANGLE (AMD Radeon R9 200 Series Direct3D11 vs_5_0 ps_5_0)', 'ANGLE (Intel(R) HD Graphics Direct3D9Ex vs_3_0 ps_3_0)', 'ANGLE (Intel(R) HD Graphics Family Direct3D9Ex vs_3_0 ps_3_0)', 'ANGLE (Intel(R) HD Graphics Direct3D9Ex vs_3_0 ps_3_0)', 'ANGLE (Intel(R) HD Graphics Family Direct3D |
| #!/usr/local/bin/bash | |
| pgrep -f rosetta | xargs kill | |
| pgrep -f node | xargs kill -9 | |
| pgrep -f rake | xargs kill -9 | |
| sleep 10 | |
| for proc in node rake rosetta ;do | |
| echo Checking for $proc processes | |
| pgrep -f $proc | |
| done |
| { | |
| "version": "0.2.0", | |
| "configurations": [ | |
| { | |
| "name": "Debug Test File (rspec)", | |
| "type": "Ruby", | |
| "request": "launch", | |
| "cwd": "${workspaceRoot}", | |
| "program": "/Users/jessejohnson/.rvm/gems/ruby-2.7.0@oris-intel-bot/bin/rspec", | |
| "args": ["-fd", "${relativeFile}"], |
| from bs4 import BeautifulSoup, Tag | |
| class Attribute(object): | |
| def __init__(self, attrname, attrvalue): | |
| 'Initializes a new attribute.' | |
| self._attrname = attrname | |
| self._attrvalue = attrvalue | |
| @property | |
| def name(self): |
| version: '3.6' | |
| services: | |
| rabbit: | |
| image: rabbitmq:3-management | |
| volumes: | |
| - ./rabbitmq.conf:/etc/rabbitmq/rabbitmq.conf:ro | |
| ports: | |
| - '8080:15672' | |
| redis: |