Skip to content

Instantly share code, notes, and snippets.

View garyblankenship's full-sized avatar
🎩
I may be slow to respond.

Gary Blankenship garyblankenship

🎩
I may be slow to respond.
View GitHub Profile
@Artefact2
Artefact2 / README.md
Last active July 19, 2025 09:55
GGUF quantizations overview
@garyblankenship
garyblankenship / deployartifact.yml
Created January 6, 2024 03:26
Workflow to Deploy Laravel to Digital Ocean
name: Deploy to DigitalOcean
on:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
@0xdevalias
0xdevalias / music-apis-and-dbs.md
Last active July 17, 2025 18:40
A collection of music APIs, databases, and related tools
@garyblankenship
garyblankenship / gracemacro.php
Last active June 23, 2025 16:08
Laravel Cache::grace() return stale and dispatch revalidate #php
<?php
/**
* Graceful cache retrieval and updating macro.
*
* First, tries to retrieve the cached value. If not found, uses a grace value.
* Schedules a background job for updating the cache if grace value is found.
*
* @param string $key The cache key to retrieve.
* @param int $ttl Time to live for the cache, in seconds.
@garyblankenship
garyblankenship / googleai.php
Last active December 15, 2023 22:42
Google AI Gemini Pro Example Laravel Usage
<?php
$response = Http::post(
"https://generativelanguage.googleapis.com/v1beta/models/gemini-pro:generateContent?key=" .
config("services.googleai.key"),
[
"contents" => [
[
"parts" => [
[
@jart
jart / rename-pictures.sh
Created December 12, 2023 15:24
Shell script for renaming all images in a folder
#!/bin/sh
# rename-pictures.sh
# Author: Justine Tunney <[email protected]>
# License: Apache 2.0
#
# This shell script can be used to ensure all the images in a folder
# have good descriptive filenames that are written in English. It's
# based on the Mistral 7b and LLaVA v1.5 models.
#
# For example, the following command:
@goran-popovic
goran-popovic / AssistantController.php
Last active December 10, 2024 03:04
Using Laravel to interact with OpenAI's Assistant API (with Vision) - Basic Example (https://geoligard.com/using-laravel-to-interact-with-openai-s-assistants-api-with-vision)
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use OpenAI\Laravel\Facades\OpenAI;
class AssistantController extends Controller
{
public function generateAssistantsResponse(Request $request)
# Clone the repo
git clone https://github.com/imartinez/privateGPT
cd privateGPT
# Install Python 3.11
pyenv install 3.11
pyenv local 3.11
# Install dependencies
poetry install --with ui,local
@nullthoughts
nullthoughts / MacroServiceProvider.php
Last active February 22, 2025 19:29
Convert Laravel Scout query to Eloquent query (Macro)
<?php
namespace App\Providers;
use Illuminate\Support\ServiceProvider;
use Laravel\Scout\Builder;
class MacroServiceProvider extends ServiceProvider
{
/**