Skip to content

Instantly share code, notes, and snippets.

@greenstevester
greenstevester / how-to-setup-ollama-on-a-macmini.md
Last active April 8, 2026 14:57
April 2026 TLDR setup for Ollama + Gemma 4 12B on a Mac mini (Apple Silicon) — auto-start, preload, and keep-alive

April 2026 TLDR setup for Ollama + Gemma 4 on a Mac mini (Apple Silicon) — auto-start, preload, and keep-alive

April 2026 TLDR Setup for Ollama + Gemma 4 on a Mac mini (Apple Silicon)

Prerequisites

  • Mac mini with Apple Silicon (M1/M2/M3/M4/M5)
  • At least 16GB unified memory for Gemma 4 (default 8B)
  • macOS with Homebrew installed
#!/bin/bash
###############################################################
# Script Name: convert-to-320-mp3.sh
# Description: Converts audio files to mp3
# Author: @miseryconfusion.com
# Date: 2025-07-09
# Version: 1.0
# Usage: ./convert-to-mp3.sh file-to-convert ...
# Notes: This script requires ffmpeg to run
@tyteen4a03
tyteen4a03 / cron-server.ts
Created November 1, 2024 17:11
Payload 3.0 Cron Runner
import { createServer } from "node:http";
import { parse } from "node:url";
import { initGraphClient } from "@/modules/msgraph/client";
import { rosterfyImportWorkflowId } from "@/modules/volunteer/workflows/rosterfyImportWorkflow";
import config from "@payload-config";
import next from "next";
import cron from "node-cron";
import { getPayload } from "payload";
const port = Number.parseInt(process.env.PORT || "3010");
@r1tsuu
r1tsuu / next.config.mjs
Last active July 1, 2024 00:34
Patch next with PR adds experimental serverOnlyDependencies property https://github.com/vercel/next.js/pull/65415
import { withPayload } from '@payloadcms/next/withPayload';
import { resolve } from 'path';
/** @type {import('next').NextConfig} */
const nextConfig = {
experimental: {
serverOnlyDependencies: [resolve(import.meta.dirname, 'payload.config.proxy.ts')],
},
};
@paulpopus
paulpopus / RichText.tsx
Created March 12, 2024 02:05
Payload lexical rich text serialiser
import React from 'react'
import { serializeLexical } from './serialize'
const RichText: React.FC<{ className?: string; content: any }> = ({ className, content }) => {
if (!content) {
return null
}
return (
@yzdbg
yzdbg / auto-dr.md
Last active December 27, 2025 05:32

Automating Daily Reports, because fuck it, really...

Each day at our company, developers are required to document their activities, painstakingly jotting down their daily work and future plans. A monotonous chore that I just really dislike.

So now, there's a scribe for that :

auto-dr-

Code

\documentclass[11pt, oneside]{article}
\usepackage[margin=0.5in]{geometry}
\geometry{letterpaper}
\usepackage[parfill]{parskip}
\usepackage{graphicx}
\usepackage{amssymb}
\usepackage{xcolor}
\pagecolor{white}
\usepackage[colorlinks = true, linkcolor = blue, urlcolor = blue]{hyperref}
\pagestyle{empty}
@hucancode
hucancode / README.md
Last active May 28, 2024 20:51
Flatten Strapi 4's response JSON

Update 29/11/2022

There is a plugin on Strapi Marketplace that do this response transforming stuffs in a more configurable way. Checkout this if you are interested.

@rithvikvibhu
rithvikvibhu / LICENSE
Last active March 11, 2026 09:17
Get tokens for Google Home Foyer API
MIT License
Copyright (c) 2020 Rithvik Vibhu
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:
@rash0
rash0 / puppeteer_twitterLogin.js
Last active June 9, 2025 07:23
Automate login to twitter with Puppeteer
const puppeteer = require("puppeteer");
const user_email = "[email protected]";
const user_handle = "@example"; //either your handle or phone number
const password = "theEndisNear";
async function fkTwitter() {
const browser = await puppeteer.launch({
headless: false,
});