document.createElement('')
- with properties:
Object.assign(document.createElement(''), {})
- defining custom elements in HTML:
customElements.define('my-tag', class extends HTMLElement {})
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 browserOpen = async (browser, url, headless = true) => { | |
const browserRef = await chromium.launch({ headless: false }); | |
page = await browserRef.newPage(); | |
await page.goto(url); | |
const element = async (selector) => await page.$(selector); | |
const click = async (selector) => await page.click(selector); | |
const inputFill = async (selector) => await page.click(selector); | |
const waitTimeout = async (milliseconds) => await page.waitForTimeout(milliseconds); | |
const countElement = async (selector) => await page.$$eval(selector, (el) => el.length); |
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
<# | |
.SYNOPSIS | |
Configures Windows 10 Client OS VSS for SentinelOne. | |
.DESCRIPTION | |
.PARAMETER |
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 { chromium } = require('playwright'); | |
(async () => { | |
const COOKIES = [{ | |
name: '_dx_captcha_vid', | |
value: '', // Enter your "_dx_captcha_vid" value here | |
url: 'https://xmuxg.xmu.edu.cn/app/214' | |
}, { | |
name: 'SAAS_U', | |
value: '', // Enter your "SAAS_U" value here |
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
function Get-InstalledSoftware | |
{ | |
<# | |
.SYNOPSIS | |
Reads installed software from registry | |
.PARAMETER DisplayName | |
Name or part of name of the software you are looking for | |
.EXAMPLE |
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
#!/bin/bash | |
# `gitea dump` doesn't currently back up LFS data as well, only git repos | |
# It primarily backs up the SQL DB, and also the config / logs | |
# We'll backup like this: | |
# * "gitea dump" to backup the DB and config etc | |
# * tar / bzip all the repos since they will be skipped | |
# * Not rotated because git data is immutable (normally) so has all data | |
# * rsync LFS data directly from /volume/docker/gitea/git/lfs | |
# * No need for rotation since all files are immutable |
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
<# | |
.SYNOPSIS | |
List Installed Programs on Windows | |
.EXAMPLE | |
. ./Get-InstalledProgram.ps1 | |
Get-InstalledProgram | Export-Csv ~/Desktop/InstalledApps.csv -Encoding UTF8 -NoTypeInformation | |
.EXAMPLE | |
. ./Get-InstalledProgram.ps1 | |
Get-InstalledProgram -Detail | Format-List | |
#> |
Tired of having to go through referral/affiliate links before you can view a deal on Slickdeals? This script strips the urls on Slickdeals of referrers. If it can't strip the urls, it marks them as "Referral Link?" in hot pink.
Install this UserScript in GreaseMonkey or similar UserScript manager.
Note: You must click View Forum Thread
(requires login)  2020 National Instruments | |
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 |