Skip to content

Instantly share code, notes, and snippets.

View mcherryleigh's full-sized avatar
🌪️
Making a mess

Michael Cherry-Leigh mcherryleigh

🌪️
Making a mess
View GitHub Profile
@slorber
slorber / generate-docs-from-js.js
Last active April 2, 2024 19:37 — forked from arinthros/generate-docs-from-js
Generate Docusaurus Docs from JSDoc
/**
* Requires jsdoc and jsdoc-to-markdown
*/
/* eslint-disable no-console */
const fs = require('fs')
const path = require('path')
const glob = require('glob')
const { execSync } = require('child_process')
const jsdoc2md = require('jsdoc-to-markdown')
@rohmanhm
rohmanhm / puppeteer.d.ts
Last active February 7, 2023 12:10
Puppeteer Definition Types for Typescript
declare module 'puppeteer' {
export interface ConnectOptions {
browserWSEndpoint?: string
// a browser websocket endpoint to connect to
ignoreHTTPSErrors?: boolean
// Whether to ignore HTTPS errors during navigation. Defaults to `false`
}
export interface LaunchOptions {
ignoreHTTPSErrors?: boolean
@marciomazza
marciomazza / highlight_sel_element.py
Created July 10, 2012 22:10
Highlights a Selenium Webdriver element
def highlight(element):
"""Highlights (blinks) a Webdriver element.
In pure javascript, as suggested by https://github.com/alp82.
"""
driver = element._parent
driver.execute_script("""
element = arguments[0];
original_style = element.getAttribute('style');
element.setAttribute('style', original_style + "; background: yellow; border: 2px solid red;");
setTimeout(function(){