Skip to content

Instantly share code, notes, and snippets.

View josephbolus's full-sized avatar

Joseph Bolus josephbolus

View GitHub Profile
@josephbolus
josephbolus / agent loop
Created March 10, 2025 09:27 — forked from jlia0/agent loop
Manus tools and prompts
You are Manus, an AI agent created by the Manus team.
You excel at the following tasks:
1. Information gathering, fact-checking, and documentation
2. Data processing, analysis, and visualization
3. Writing multi-chapter articles and in-depth research reports
4. Creating websites, applications, and tools
5. Using programming to solve various problems beyond development
6. Various tasks that can be accomplished using computers and the internet

You are an AI assistant tasked with creating a highly engaging, personalized check-in flow for a user. This flow should emulate a beautifully designed iOS app, focusing on simplicity, clear call-to-actions, and an overall delightful user experience. Your role combines that of a personality coach and an expert UX designer.

Here's the theme for today's check-in: {{THEME}}

And here's the context we have about the user: <user_context> {{USER_CONTEXT}}

@josephbolus
josephbolus / README.md
Last active October 28, 2024 02:39
Calculates optimized MySQL 8 settings based on system resources.

How to use:

jbolus@sandbox:/tmp$ chmod +x mysql-conf-optimizer.sh
jbolus@sandbox:/tmp$ ./mysql-conf-optimizer.sh
MySQL Optimization Suggestions:
---------------------------------
innodb_buffer_pool_size: 24GB
innodb_buffer_pool_instances: 20
innodb_io_capacity: 4000
#!/bin/bash
# https://docs.rockylinux.org/guides/interoperability/import_rocky_to_wsl/
sudo dnf upgrade --refresh
dnf upgrade --refresh
sudo
dnf install -y nano mc passwd sudo dnf-plugin-config-manager wget dnf-plugins-core tree dos2unix epel-release NetworkManager iproute
su root
sudo mc
ls
sudo dnf config-manager --set-enabled crb
@josephbolus
josephbolus / mysql-high-cpu.md
Last active October 3, 2024 06:29
Troubleshooting High CPU in MySQL

Troubleshooting High CPU in MySQL

tags: linux dba mysql

Overview

With MySQL 5.7, the PERFORMANCE_SCHEMA.THREADS table added THREAD_OS_ID. This column helps identify sessions consuming high CPU resources, especially when one query overloads a CPU core.

To troubleshoot, use pidstat from the sysstat package. The -t option shows thread-level usage, and -p with the MySQL process ID filters results to MySQL threads:

@josephbolus
josephbolus / docker-iptables-fix.sh
Last active August 9, 2024 02:59 — forked from pedrolamas/docker-iptables-fix.sh
Forwarding real IP when running as a container by fixing Docker iptables on Synology NAS
#!/bin/bash
currentAttempt=0
totalAttempts=10
delay=15
while [ $currentAttempt -lt $totalAttempts ]
do
currentAttempt=$(( $currentAttempt + 1 ))
echo "Attempt $currentAttempt of $totalAttempts..."
@josephbolus
josephbolus / printer.conf
Created August 2, 2024 02:25 — forked from jasonehines/printer.conf
Ender 3 Pro Creality 4.2.7 with bltouch - Klipper printer Configuration
# This file contains pin mappings for the Creality "v4.2.7" board. To
# use this config, during "make menuconfig" select the STM32F103 with
# a "28KiB bootloader" and serial (on USART1 PA10/PA9) communication.
# If you prefer a direct serial connection, in "make menuconfig"
# select "Enable extra low-level configuration options" and select
# serial (on USART3 PB11/PB10), which is broken out on the 10 pin IDC
# cable used for the LCD module as follows:
# 3: Tx, 4: Rx, 9: GND, 10: VCC
@josephbolus
josephbolus / marks.md
Created July 4, 2024 20:10
Small scripts, hacks and automations.

This is more in the "hack" category, but here is a solution for bookmarking directories[1] that I am quite fond of:

mkdir -p ~/.marks/
export CDPATH=.:~/.marks/
function mark { ln -sr "$(pwd)" ~/.marks/"$1"; }

Then:

@josephbolus
josephbolus / scan.sh
Created July 4, 2024 19:49
Use the following tiny script to make PDFs look like they have been scanned.
#!/bin/sh
# Help message
show_help() {
echo
echo "Convert PDFs to make them look like they have been scanned"
echo "Example: $0 file.pdf"
}
# Check if the provided argument is not empty
@josephbolus
josephbolus / dracula-theme.css
Last active July 5, 2024 20:17
dracula-theme.css
/* Casual stab at modifying the Bookstack main theme using the Dracula color scheme. Download and use at your own risk. */
/* https://github.com/domainzero/bookstack-dark-theme */
/* optional */
/* uppercase titles */
.page-content h1{text-transform:uppercase}
h1.break-text{text-transform:uppercase}
/* Dracula stuff */
/* background */