Skip to content

Instantly share code, notes, and snippets.

View cookernetes's full-sized avatar

cookernetes cookernetes

View GitHub Profile
@cookernetes
cookernetes / isbn13validator.py
Created November 2, 2023 12:22
ISBN-13 Validator w/ Check Digit Validation (Python)
import re
test_good_isbns = ["978-0-596-52068-7", "9780596520687"]
isbn_13_pattern = re.compile(r"^[0-9]{3}[\s-]?[0-9][\s-]?[0-9]{3}[\s-]?[0-9]{5}[\s-]?[0-9]$")
class ISBN13:
def __init__(self, isbn_in):
self.isbn = isbn_in
@cookernetes
cookernetes / stripe_payload_hook_integration.ts
Last active January 27, 2023 22:16
Stripe + Payload CMS Integration for easy product management :)
import { CollectionBeforeChangeHook } from "payload/types";
import Stripe from "stripe";
export const syncWithStripe: CollectionBeforeChangeHook = async ({
operation,
data,
originalDoc,
}) => {
const stripe = new Stripe(process.env.T_STRIPE_SECRET!, {
apiVersion: "2022-11-15",
{
"people": ["76561199221287648"]
}
@cookernetes
cookernetes / rules.json
Created November 13, 2021 18:53
Psuedodoro's Best ESLint Rules
{
"rules": {
"quotes": [
"error",
"double"
],
"semi": [
"error",
"always"
],

English (trump) Homework

Work by Henry Sargeant.

Main Work

  • Q. What role does the media play in establishing facts or putting out opinions
  • A. In my opinion, the media plays a massive role in establishing facts or putting out opinions. Mainly because most of the media like the news etc is viewed by so many people. Because these forms of media are viewed by so many people every single day: a lot of people will listen/read to what they are saying, meaning that even some will believe what they are saying because where the information is coming from is from a widespread source.