from pydantic import BaseModel, validator, ValidationError
class EventData(BaseModel):
title: str
start_time: str
end_time: str
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """ | |
| Flexible Data Access Utilities | |
| ============================== | |
| This module provides utilities for flexible, safe access to data structures | |
| with mixed access patterns (attribute access, dictionary access) and automatic | |
| handling of nested structures. | |
| Key features: | |
| - Access data via attributes or dictionary keys transparently |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| export const jsonSchemaToValidation = (schema, watchedValues = {}) => { | |
| const rules = {}; | |
| // Process conditional requirements from allOf | |
| const getConditionalRequiredFields = () => { | |
| const conditionalRequired = new Set(schema.required || []); | |
| if (schema.allOf) { | |
| schema.allOf.forEach(condition => { | |
| if (condition.if && condition.then) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # WiFi: On | |
| sudo profiles show -type enrollment | |
| # Take note of domains used for enrollment | |
| # WiFi: Off | |
| sudo profiles remove -all | |
| # Restart: Recovery Mode | |
| csrutil disable; reboot |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module.exports = { | |
| root: true, | |
| parser: '@typescript-eslint/parser', | |
| extends: [ | |
| 'next/core-web-vitals', | |
| 'plugin:@typescript-eslint/recommended', | |
| 'plugin:prettier/recommended', | |
| 'prettier', | |
| ], | |
| plugins: ['jest', '@typescript-eslint', 'prettier'], |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { OAuthConfig, OAuthUserConfig } from 'next-auth/providers'; | |
| import getConfig from 'next/config'; | |
| const { publicRuntimeConfig } = getConfig(); | |
| export interface BoltProfile extends Record<string, any> { | |
| profile: Profile; | |
| addresses: Address[]; | |
| // payment_methods: PaymentMethod[]; # TODO: Implement... | |
| has_bolt_account: boolean; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Enforce PR Title Style | |
| on: | |
| pull_request: | |
| types: [opened, edited, synchronize, reopened] | |
| jobs: | |
| enforce_pr_title: | |
| name: Enforce PR Title Style | |
| runs-on: ubuntu-latest | |
| steps: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| namespace :dev do | |
| namespace :db do | |
| desc 'Reset database and import production data' | |
| task restore_from_prod: :environment do | |
| unless Rails.env.development? | |
| puts("This task is only available in development") | |
| next | |
| end | |
| tmp_path = Rails.root.join("tmp") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| await new Promise(res => setTimeout(res, 1200)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { ExecutionContext, Injectable } from '@nestjs/common'; | |
| import { AuthGuard } from '@nestjs/passport'; | |
| import { GqlExecutionContext } from '@nestjs/graphql'; | |
| // import { UserService } from 'src/user/user.service'; | |
| @Injectable() | |
| export class GqlAuthGuard extends AuthGuard('jwt') { | |
| // constructor(@Inject(UserService) private readonly userService: UserService) { | |
| // super(); | |
| // } |
NewerOlder