Skip to content

Instantly share code, notes, and snippets.

View zstix's full-sized avatar
📚
Studying infosec

Zack Stickles zstix

📚
Studying infosec
View GitHub Profile
@zstix
zstix / update-partner-data-sources.ts
Created January 30, 2023 23:24
Script to help track down the correct primary installation method (from install plans from quickstarts)
import * as path from 'path';
import * as glob from 'glob';
import * as yaml from 'js-yaml';
import * as fs from 'fs';
import Quickstart from './lib/Quickstart';
import InstallPlan from './lib/InstallPlan';
import type {
DataSourceConfig,
@zstix
zstix / pull-request-review-checklist.md
Created July 8, 2021 20:52
A checklist of things to check while reviewing a front-end pull request

1. Continuous Integration

  1. Have the required tests passed?
  2. Has the build completed successfully?
  3. Does the submitted code meet linting requirements?
  4. Have all the other required checks passed?

2. Code Style

  1. Are variables and function names consistent with the code base?
  2. Are variables and function names clear and accurate?
  3. Are the files located in a reasonable location?
#!/bin/sh
RED='\033[0;31m'
RESET='\033[0m'
UNDERLINE='\033[4m'
REGEX="^(revert|feat|fix|ci|chore|docs|test|style|refactor)(\(.+?\))?:.{1,}$"
if ! head -1 "$1" | grep -qE $REGEX; then
echo "${RED}Commit message invalid: please use conventional commits${RESET}"
#! /usr/bin/python
import requests
import json
import itertools
API_URL = "https://api.github.com"
HEADERS = {"Accept":"application/vnd.github.inertia-preview+json"}
ORG = "newrelic"
Nerdpack Observability Pack
Propriatary term to NR
Contains multiple things that get added to an account
Explained on the developer site
Contains a top-level configuration file
Contains a top-level logo / icon file
Has a directory for each type of component
Can be discovered through a catalog
"pack"
// Generates a simplified kanban board view for a Github project.
// Author: Zack Stickles
//
// Requires a GH_TOKEN is set in the environment (with org and repo read permissions).
/*
*/
const { Octokit } = require("@octokit/rest");
  1. Learn how to learn
  • vimtutor
  • :help user-manual
  • Never stop learning
  • Pick up one new thing each week

What does Control-R do? :help <C-r>

How do I use completion in insert mode? :help ins-completion

@zstix
zstix / add-to-project.sh
Created March 19, 2021 19:04
GH CLI to add a PR to project column
# Update the project name, column name, and pull the PR number from the environment
HEADER="Accept: application/vnd.github.inertia-preview+json" && \
PROJECT="$(gh api -H $HEADER repos/:owner/:repo/projects --jq '.[] | select(.name == "YOUR PROJECT").id')" && \
COLUMN="$(gh api -H $HEADER projects/$PROJECT/columns --jq '.[] | select(.name == "YOUR COLUMN").id')" && \
gh api -H $HEADER -X POST /projects/columns/$COLUMN/cards -f content_type='PullRequest' -F content_id=1234