Skip to content

Instantly share code, notes, and snippets.

View belfie13's full-sized avatar
🤒
Out sick

CIIDMike belfie13

🤒
Out sick
  • B13
  • Australis
View GitHub Profile
@rcarmo
rcarmo / automator.py
Last active March 28, 2025 02:39
macOS Services in the style of NotesOllama
# Drop this into Automator using Python 3 as the shell
from sys import stdin
from json import dumps, loads
from urllib.parse import urlencode
from urllib.request import Request, urlopen
AZURE_ENDPOINT="getyourowndeployment.openai.azure.com"
OPENAI_API_KEY="getyourownkey"
OPENAI_API_VERSION="2023-05-15"
@tnarla
tnarla / 8ball.tsx
Created November 7, 2023 20:08
8ball code!
"use client";
import { motion } from "framer-motion";
import { useCallback, useEffect, useRef, useState } from "react";
interface Todo {
text: string;
completed: boolean;
}
<?php
/**
* On every loop of `while(true)` we check:
* 1. If all elements in group have same head -> extract it to common head,
* 2. If all elements in group have same tail -> extract it to common tail,
* 3. If some elements have common head -> create sub group of this elements, and put there head as common head of group,
* 4. Same for tails.
* If none of previous happen - we stop loop.
* Then check if current group has empty entry and convert it to optional (like `(a|b|) -> (a|b)?`).
@iluuu1994
iluuu1994 / README.md
Last active April 15, 2024 10:45
${} string interpolation migration script

Copy the migrator.php file to the root of your project and run the following command:

for file in **/*.php; do php ./migrator.php "$file"; done

BACK UP YOUR REPOSITORY BEFORE RUNNING THIS SCRIPT!

@agyild
agyild / FSR.glsl
Last active November 19, 2025 20:48
AMD FidelityFX Super Resolution v1.0.2 for mpv
// Copyright (c) 2021 Advanced Micro Devices, Inc. All rights reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
@ranacseruet
ranacseruet / PDAO.php
Last active October 21, 2023 16:31
PHP Dynamic Object With Array and Iterative access capability
<?php
class PDAO implements \ArrayAccess, \Iterator
{
/**
* @var array data
*/
protected $data = array();
/**
@ranacseruet
ranacseruet / VideoStream.php
Last active November 12, 2025 17:53
PHP VideoStream class for HTML5 video streaming
<?php
/**
* Description of VideoStream
*
* @author Rana
* @link http://codesamplez.com/programming/php-html5-video-streaming-tutorial
*/
class VideoStream
{
private $path = "";