Description |
import { z } from "zod"; | |
import { zodToTs, printNode } from "zod-to-ts"; | |
// Replace with your `openai` thing | |
import { openai } from "../openai.server"; | |
import endent from "endent"; | |
function createJSONCompletion<T extends z.ZodType>({ | |
prompt, | |
schema_name, |
In your command-line run the following commands:
brew doctor
brew update
When querying your database in Sequelize, you'll often want data associated with a particular model which isn't in the model's table directly. This data is usually typically associated through join tables (e.g. a 'hasMany' or 'belongsToMany' association), or a foreign key (e.g. a 'hasOne' or 'belongsTo' association).
When you query, you'll receive just the rows you've looked for. With eager loading, you'll also get any associated data. For some reason, I can never remember the proper way to do eager loading when writing my Sequelize queries. I've seen others struggle with the same thing.
Eager loading is confusing because the 'include' that is uses has unfamiliar fields is set in an array rather than just an object.
So let's go through the one query that's worth memorizing to handle your eager loading.
#!/bin/bash | |
# cd into the directory with the images you want to resize then run this. | |
# install slugify with brew install slugify | |
mkdir resized | |
sips -Z 1920 -s formatOptions 65 -s format jpeg * --out resized/ | |
slugify -acdtu resized/* |
<script> | |
/* Modificacion del original en postingcode.com | |
* Agregado el control de variable cedulaValida y controlando ced.length a menor de 11 | |
* para los casos de cédulas sin guiones | |
* | |
* La cedula utilizada ES una cedula valida y asignada al ciudadano gerente de este script | |
* Modificación por Victor Abreu | www.vicabreu.com | |
* Nombre del archivo: ValidaCedulaDominicana.html | |
*/ | |
/* Use WP-CLI instead https://developer.wordpress.org/cli/commands/search-replace/ */ | |
SET @oldsite='http://oldsite.com'; | |
SET @newsite='http://newsite.com'; | |
UPDATE wp_options SET option_value = replace(option_value, @oldsite, @newsite) WHERE option_name = 'home' OR option_name = 'siteurl'; | |
UPDATE wp_posts SET post_content = replace(post_content, @oldsite, @newsite); | |
UPDATE wp_links SET link_url = replace(link_url, @oldsite, @newsite); | |
UPDATE wp_postmeta SET meta_value = replace(meta_value, @oldsite, @newsite); | |
/* only uncomment next line if you want all your current posts to post to RSS again as new */ |
var querystring = require('querystring'); | |
var http = require('http'); | |
var util = require('util'); | |
exports.process = function(message, sayCallback) { | |
if(message.indexOf('generate meme') !== -1) { | |
var params = message.split(' '); | |
if(exports.types[params[2]]) { | |
var linesRegex = new RegExp(params[2] + " (.*) / (.*)"); | |
var lines = linesRegex.exec(message); |
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
Version 2, December 2004 | |
Copyright (C) 2011 Jed Schmidt <http://jed.is> | |
Everyone is permitted to copy and distribute verbatim or modified | |
copies of this license document, and changing it is allowed as long | |
as the name is changed. | |
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE |