Skip to content

Instantly share code, notes, and snippets.

View potatoqualitee's full-sized avatar
big permz energy

Chrissy LeMaire potatoqualitee

big permz energy
View GitHub Profile
@potatoqualitee
potatoqualitee / swagger.json
Created November 28, 2022 18:47
swagger.json
View swagger.json
{
"openapi": "3.0.0",
"info": {
"title": "Mastodon API",
"description": "This an attempt to document Mastodon's API based on the code in https://github.com/mastodon/mastodon",
"contact": {
"name": "Malcolm VanOrder",
"email": "mvanorder1390@gmail.com"
},
"license": {
@potatoqualitee
potatoqualitee / encryption-commands.md
Created November 16, 2022 12:12
Encryption Commands
View encryption-commands.md

Thanks for attending the session! Here are all of our related security commands:

Add-DbaComputerCertificate              
Backup-DbaComputerCertificate           
Backup-DbaDbCertificate                 
Backup-DbaDbMasterKey                   
Backup-DbaServiceMasterKey              
Disable-DbaDbEncryption                 
Disable-DbaForceNetworkEncryption       
@potatoqualitee
potatoqualitee / winterm.json
Created September 22, 2022 11:13
winterm.json
View winterm.json
{
"$help": "https://aka.ms/terminal-documentation",
"$schema": "https://aka.ms/terminal-profiles-schema",
"actions":
[
{
"command":
{
"action": "copy",
"singleLine": false
@potatoqualitee
potatoqualitee / Invoke-Program.ps1
Created September 7, 2022 12:59
Invoke-Program
View Invoke-Program.ps1
function Invoke-Program {
[CmdletBinding()]
[OutputType([System.Management.Automation.PSObject])]
param
(
[Parameter(Mandatory)]
[ValidateNotNullOrEmpty()]
[string]$FilePath,
[Parameter()]
@potatoqualitee
potatoqualitee / download-file.js
Created September 3, 2022 01:43
download-file.js
View download-file.js
const { chromium } = require('playwright');
(async () => {
const browser = await chromium.launch({ headless: true, downloadsPath: '' });
const page = await browser.newPage({ acceptDownloads: true });
await page.goto('https://windowsterminalthemes.dev/');
const [download] = await Promise.all([
page.waitForEvent('download'),
@potatoqualitee
potatoqualitee / colors.ps1
Created September 1, 2022 19:08
colors.ps1
View colors.ps1
function Get-Rgb {
[cmdletbinding()]
param(
[string[]]$Color
)
# Clean up
if ($first = $Color[1]) {
$cleanedcolor = $Color -join ","
if ($first -notmatch "rgb" -and $first -notmatch "\(") {
@potatoqualitee
potatoqualitee / screenshot.js
Created August 30, 2022 10:31
screenshot.js
View screenshot.js
var { chromium } = require('playwright');
(async function () {
var themeparam = process.argv[2];
var path = require('path');
var fs = require('fs');
var directoryPath = path.join(__dirname, 'themes');
var file = path.join(directoryPath, `${themeparam}.json`);
console.log("processing " + file);
@potatoqualitee
potatoqualitee / whatever.yml
Created August 27, 2022 16:42
doesnt work
View whatever.yml
on: push
env:
POSTGRES_DB: postgres
POSTGRES_PASSWORD: postgres_password
POSTGRES_PORT: 5432
POSTGRES_USER: postgres
DATABASE_URL: postgres://postgres:postgres_password@localhost:5432/postgres
jobs:
process-json:
runs-on: ubuntu-latest
@potatoqualitee
potatoqualitee / action.yml
Last active August 27, 2022 01:15
Download file using Playwright in GitHub Actions
View action.yml
on: push
jobs:
download-file:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: lts/*
@potatoqualitee
potatoqualitee / overview.ps1
Created August 26, 2022 09:08
dbatools presentation scripts
View overview.ps1
<#
Combo commands that are powerful and fun
1. Encrypting
2. Testing your backups
3. Disaster Recovery
#>
# Show SSMS