This file contains 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
<?php | |
// This function converts a normal currency amount to a Stripe-compatible amount. | |
// To be used on creating Stripe Checkout Stations | |
// e.g. USD 10.00 to 1000 | |
if (! function_exists('convert_normal_to_stripe_amount')) { | |
function convert_normal_to_stripe_amount($currency, $amount) | |
{ | |
$stripe_amount = $amount; |
This file contains 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
// Made by @charlestehio: https://x.com/charlestehio | |
// Usage: https://abc.workers.dev/?query=your%20embedding%20query | |
import { Ai } from './vendor/@cloudflare/ai.js'; | |
export default { | |
async fetch(request, env) { | |
// Parse the URL to get query parameters | |
const url = new URL(request.url); | |
var query = url.searchParams.get('query'); |
This file contains 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
<?php | |
if (! function_exists('get_sql_from_eloquent')) { | |
/** | |
* A Function to dump SQL query out from an Eloquent object. | |
* | |
* @param \Illuminate\Database\Eloquent\Builder $query The Eloquent object. | |
* @return string The SQL query. | |
* | |
* Usage: dd(get_sql_from_eloquent(\App\Models\User::query())); |