Skip to content

Instantly share code, notes, and snippets.

View jwatney's full-sized avatar

Jonathon Watney jwatney

View GitHub Profile
@jwatney
jwatney / gist:62bb3b3b1eca0f0754e1faea6cbcddc6
Created March 11, 2024 21:46
Playwright test for grepping webpage responses
import { Response, test } from '@playwright/test'
const pattern = new RegExp('some string...', 'i')
const urls = ['https://some.url.com/some/page.html']
const requestURLValidator = (response: Response) => {
const requestURL = response.url()
if (pattern.test(requestURL)) {
@jwatney
jwatney / .eslintrc.js
Created March 26, 2023 02:47 — forked from onlime/.eslintrc.js
ESLint/Prettier config for Vue 3 in VS Code
module.exports = {
root: true,
env: {
browser: true,
node: true,
},
extends: [
'eslint:recommended',
'plugin:vue/vue3-recommended',
'prettier'
@pedrouid
pedrouid / setup-ssl.md
Last active March 28, 2025 14:57
Setup SSL with NGINX reverse proxy

Get a Free SSL Certificate With Let’s Encrypt

Let’s Encrypt is a free, automated, and open Certificate Authority.

  1. Install tools for using the Let's Encrypt certificates using Certbot
  sudo apt-get update \
  sudo apt-get install software-properties-common
@jwatney
jwatney / MoqDataExtensions
Created April 8, 2012 06:20
Moq extensions for mocking ADO.NET interfaces.
using System;
using System.Collections;
using System.Data;
using Moq;
namespace Moq.DataExtensions {
public static class MockFactoryDataExtensions {
public static Mock<IDbCommand> CreateIDbCommand(this MockFactory factory) {
var command = factory.Create<IDbCommand>();