- Install cloudflared:
brew install cloudflared - Have access to the Cloudflare account for the unidy.de domain
Fran Zekan:
<script>
// Custom validation function for date_of_birth
function dateOfBirthValidation(value) {
const today = new Date();
const dob = new Date(value);
let age = today.getFullYear() - dob.getFullYear();
const monthDiff = today.getMonth() - dob.getMonth();
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
| "use client"; | |
| import { useQuery } from "@tanstack/react-query"; | |
| import { useEffect, useState } from "react"; | |
| const apiCall = (url: string, options: RequestInit) => { | |
| return fetch(url, { | |
| ...options, | |
| headers: { | |
| ...options.headers, |
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
| alias yeet="gt ss" | |
| alias yeetpr="git push && gh pr create -a @me -f" | |
| yeetfix() { | |
| # Merge all arguments into a single string with spaces | |
| local commit_message="$*" | |
| # Replace spaces in the commit message with dashes for the branch name | |
| local branch_name=$(echo "$*" | tr ' ' '-' | tr '[:upper:]' '[:lower:]') | |
| # Create a new branch | |
| git checkout -b "$branch_name" |
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
| if ARGV.any? { |arg| %w[db:drop db:reset db:setup].include?(arg) } && ENV['YES_DROP'] != 'true' | |
| # this is wrapped in a method for easier early returns | |
| def check_db_drop | |
| require 'dotenv' | |
| require 'json' | |
| env = Dotenv.parse('.env') | |
| db_url = env['DATABASE_URL'] | |
| unless db_url.nil? |
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
| model Database { | |
| id Int @id @default(autoincrement()) | |
| createdAt DateTime @default(now()) | |
| updatedAt DateTime @updatedAt | |
| name String | |
| slug String @unique | |
| columns DatabaseColumn[] @relation("inDb") | |
| rows DatabaseRow[] | |
| belongsTo User @relation(fields: [belongsToId], references: [id]) | |
| belongsToId String |
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 { PrismaClient } from "@prisma/client"; | |
| const mode = Bun.argv[2] === "manual" ? "manual" : "transaction"; | |
| console.log(`Running in ${mode}`); | |
| async function createSocialLoginMigration( | |
| prismaClient: PrismaClient, | |
| providerName: "google" | "github" | |
| ) { | |
| const users = await prismaClient.user.findMany({ |
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
| class PostsController < ApplicationController | |
| def index | |
| end | |
| def new | |
| @post = Post.new(date: params[:date]) | |
| end | |
| private |
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
| <h2><%= request.fullpath %></h2> | |
| <ul> | |
| <% @topics.each do |topic| %> | |
| <li> | |
| <%= link_to topic.name, sandbox_path(topic_id: topic.id) %> | |
| </li> | |
| <% end %> | |
| </ul> |
NewerOlder