Skip to content

Instantly share code, notes, and snippets.

View dwelch2344's full-sized avatar

David Welch dwelch2344

View GitHub Profile
@dwelch2344
dwelch2344 / vite.config.js
Created March 8, 2024 00:18
Obfuscate via vite
import { defineConfig } from 'vite';
import path from 'path';
import glob from 'glob';
import { esbuildCommonjs } from '@originjs/vite-plugin-commonjs';
// Function to generate a virtual entry file content
const generateVirtualEntry = (srcFiles, moduleFiles) => {
let content = '';
// Import specific modules first
content += moduleFiles.map(file => `import "${file}";`).join('\n');
# → npm audit --parseable | grep "Will install"
Will install eslint@8.57.0, which is a breaking change
Will install webpack-dev-server@5.0.2, which is a breaking change
Will install css-loader@6.10.0, which is a breaking change
Will install webpack-bundle-analyzer@4.10.1, which is a breaking change
Will install webpack-dev-server@5.0.2, which is a breaking change
Will install webpack-dev-server@5.0.2, which is a breaking change
Will install html-webpack-plugin@5.6.0, which is a breaking change
Will install webpack-dev-server@5.0.2, which is a breaking change
Will install url-loader@4.1.1, which is a breaking change

Summarize Okta's Identity offering(s)

Okta's identity solutions offer a comprehensive suite of tools designed to manage and secure user identities and access privileges within organizations. Their offerings can be broadly summarized as follows:

  1. Single Sign-On (SSO): Allows users to access multiple applications with a single set of credentials, improving user experience and reducing password fatigue.

  2. Multi-Factor Authentication (MFA): Adds an extra layer of security by requiring users to provide multiple forms of identification before accessing sensitive resources.

  3. Universal Directory: A flexible and scalable cloud-based directory for storing and managing user, group, and device profiles across an organization.

git add -A; \
git commit --amend --no-edit; \
git push -f; \
gh workflow run example-workflow.yml --ref example_branch; \
sleep 2; \
gh run list --json url --workflow=example-workflow.yml \
| jq -r '.[0].url' \
| xargs open
@dwelch2344
dwelch2344 / should this run on mac.txt
Last active October 1, 2023 20:11
Is NX 16 broken or is it just me?
→ mkdir -p /tmp/nx_darwin
cd /tmp/nx_darwin
npm i @nx/nx-darwin-arm64@16.8.0
chmod a+x node_modules/@nx/nx-darwin-arm64/nx.darwin-arm64.node
node_modules/@nx/nx-darwin-arm64/nx.darwin-arm64.node
added 1 package in 1s
zsh: exec format error: node_modules/@nx/nx-darwin-arm64/nx.darwin-arm64.node
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const semver = require("semver");
const config_1 = require("../config");
const http_utils_1 = require("../http_utils");
const config_source_1 = require("./config_source");
class ChromeXml extends config_source_1.XmlConfigSource {
constructor() {
super('chrome', config_1.Config.cdnUrls()['chrome']);
this.maxVersion = config_1.Config.binaryVersions().maxChrome;
#!/bin/bash
YELLOW='\033[0;33m'
NC='\033[0m' # No Color
for d in *hexly*/ ; do
if [[ ! -d "$d/.git" ]]; then
: # noop
else
cd $d
if [[ -n $(git status -s) ]]; then
echo -e "${YELLOW}$d${NC}"
@dwelch2344
dwelch2344 / scrub-apollo-fields-for-active-and-report.js
Created January 12, 2022 17:25
Search Apollo GraphQL Fields report for active fields in last 24 hours
// inject jquery
(function (){ function l(u, i) { var d = document; if (!d.getElementById(i)) { var s = d.createElement('script'); s.src = u; s.id = i; d.body.appendChild(s); } } l('//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js', 'jquery') })();
const runReport = () => {
$ = jQuery
// get all the rows with 0 calls and remove htem
targets = $('span.flex.items-center ').toArray().map($)
targets.filter(e => parseInt(e.html()) === 0).forEach(e => e.closest('tr').remove())
@dwelch2344
dwelch2344 / class-wc-shipstation-api-export.php
Last active March 17, 2021 11:33
Add hooks to WC_Shipstation_API_Export
<?php
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly
}
/**
* WC_Shipstation_API_Export Class
*/
class WC_Shipstation_API_Export extends WC_Shipstation_API_Request {
test('events', async() => {
const { EventEmitter } = require('events')
const ee = new EventEmitter()
const handler = (breadcrumb: string, delay: number) =>
(promises: Promise<unknown>[]) => {
promises.push(new Promise(resolve => {