Skip to content

Instantly share code, notes, and snippets.

View maxxheth's full-sized avatar
🏠
The time never feels just right, so get started anyway!

Maximillian Heth maxxheth

🏠
The time never feels just right, so get started anyway!
View GitHub Profile
@maxxheth
maxxheth / gist:a7e8647e5b2e8c8bcd89a0f75d1f94dc
Created May 16, 2026 17:54
OpenMonoAgent.ai Tuning Script
#!/usr/bin/env bash
set -euo pipefail
OPENMONO_DIR="${OPENMONO_DIR:-$HOME/openmono.ai}"
COMPOSE_FILE="${COMPOSE_FILE:-$OPENMONO_DIR/docker/docker-compose.override.yml}"
BACKUP_DIR="${BACKUP_DIR:-$OPENMONO_DIR/docker/.openmono-tune-backups}"
DRY_RUN=0
RESTART=0
@maxxheth
maxxheth / user.sql
Created June 9, 2023 19:15
PostgreSQL schema and functions for User model
CREATE TABLE User (
id SERIAL PRIMARY KEY,
name VARCHAR(255),
email VARCHAR(255) UNIQUE,
password VARCHAR(255),
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
CREATE OR REPLACE FUNCTION CreateUser(p_name VARCHAR(255), p_email VARCHAR(255), p_password VARCHAR(255))
@maxxheth
maxxheth / user.sql
Created June 9, 2023 19:13
MySQL schema and procedures for User model
CREATE TABLE User (
id INT PRIMARY KEY,
name VARCHAR(255),
email VARCHAR(255) UNIQUE,
password VARCHAR(255),
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
);
DELIMITER $$
@maxxheth
maxxheth / user.sql
Created June 9, 2023 19:09
MySQL schema for User model
CREATE TABLE User (
id INT PRIMARY KEY,
name VARCHAR(255),
email VARCHAR(255) UNIQUE,
password VARCHAR(255),
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
);
@maxxheth
maxxheth / array_flatten.php
Created December 12, 2022 08:42 — forked from SeanCannon/array_flatten.php
PHP array_flatten() function. Convert a multi-dimensional array into a single-dimensional array.
<?php
/**
* Convert a multi-dimensional array into a single-dimensional array.
* @author Sean Cannon, LitmusBox.com | seanc@litmusbox.com
* @param array $array The multi-dimensional array.
* @return array
*/
function array_flatten($array) {
if (!is_array($array)) {
@maxxheth
maxxheth / 000-default.conf
Created June 3, 2022 01:57 — forked from zetc0de/000-default.conf
Apache 000-default.conf + PHP-FPM
<VirtualHost *:80>
# The ServerName directive sets the request scheme, hostname and port that
# the server uses to identify itself. This is used when creating
# redirection URLs. In the context of virtual hosts, the ServerName
# specifies what hostname must appear in the request's Host: header to
# match this virtual host. For the default virtual host (this file) this
# value is not decisive as it is used as a last resort host regardless.
# However, you must set it for any further virtual host explicitly.
#ServerName www.example.com
@maxxheth
maxxheth / tsconfig.json
Created May 21, 2022 00:44 — forked from mtimbs/tsconfig.json
basic default tsconfig for use in TypeScript projects
{
"compilerOptions": {
// project options
"lib": [
"ESNext",
"dom"
], // specifies which default set of type definitions to use ("DOM", "ES6", etc)
"outDir": "lib", // .js (as well as .d.ts, .js.map, etc.) files will be emitted into this directory.,
"removeComments": true, // Strips all comments from TypeScript files when converting into JavaScript- you rarely read compiled code so this saves space
"target": "ES6", // Target environment. Most modern browsers support ES6, but you may want to set it to newer or older. (defaults to ES3)
@maxxheth
maxxheth / publisher.go
Created April 29, 2021 19:55 — forked from leolara/publisher.go
Example in Go of how to close a channel written by several goroutines
// Package gochannels example of how to close a channel written by several goroutines
package gochannels
import (
"math/big"
"sync"
)
// Publisher write sequences of big.Int into a channel
type Publisher struct {
@maxxheth
maxxheth / scrape_entire_website_with_wget.sh
Created October 28, 2020 20:03 — forked from pe3/scrape_entire_website_with_wget.sh
Scrape An Entire Website with wget
this worked very nice for a single page site
```
wget \
--recursive \
--page-requisites \
--convert-links \
[website]
```
wget options