Skip to content

Instantly share code, notes, and snippets.

View petebytes's full-sized avatar

petebytes petebytes

View GitHub Profile
require 'data-anonymization'
DataAnon::Utils::Logging.logger.level = Logger::INFO
class MyRandomEmail
TLDS = ['com','org','net','edu','gov','mil','biz','info', 'io']
HOSTNAMES = ['google', 'outlook', 'hotmail']
def initialize hostname = nil, tld = nil
@hostname = hostname
@tld = tld
@petebytes
petebytes / shrine.rb
Created July 24, 2021 19:20
Attempt to have both Public and Private Shrine Storages
# frozen_string_literal: true
require "shrine"
require "shrine/storage/s3"
s3_options = {
access_key_id: ENV["AWS_ACCESS_KEY"],
secret_access_key: ENV["AWS_SECRET_KEY"],
endpoint: ENV["AWS_ENDPOINT"],
region: ENV["AWS_REGION"],
@petebytes
petebytes / byebug_commands.md
Created August 22, 2021 04:31 — forked from elrayle/byebug_commands.md
Byebug Cheatsheet - organized by related commands

Byebug Cheatsheet

This cheatsheet includes most of the byebug commands organized by related commands (e.g. breakpoint related commands are together).

To see official help...

Command Aliases Example Comments
help h h list top level of all commands
help cmd h cmd-alias h n list the details of a command (example shows requesting details for the next command) (this works for all commands)
@petebytes
petebytes / Pghero on Rails with Dokku.txt
Created January 16, 2023 16:39 — forked from monsha/Pghero on Rails with Dokku.txt
Pghero on Rails with Dokku
#postgresql setup
ssh -i ~/.ssh/id_rsa root@<domain>
dokku postgres:connect <db>
psql=# SHOW config_file;
-> /var/lib/postgresql/data/postgresql.conf
psql=# \q
docker ps
@petebytes
petebytes / setup_bark_wsl.sh
Last active May 2, 2023 04:51
Setup bark on WSL
#!/bin/zsh
# requires Nvidia GPU
# Update package list
sudo apt update
# Remove Outdated Signing Key
sudo apt-key del 7fa2af80
@petebytes
petebytes / README.md
Last active February 12, 2025 04:49 — forked from awni/README.md
Test Time Scaling with R1-based Models and MLX LM

Test Time Scaling with MLX LM and R1-based LLMs

Install MLX LM:

pip install mlx-lm

And run:

@petebytes
petebytes / increase_model_context.sh
Last active March 11, 2025 22:26
Script to increase Ollama model context
#!/bin/bash
# developed and tested on a macbook
# original instructions discovered at <https://www.youtube.com/@technovangelist>
# Check if correct number of arguments provided
if [ $# -ne 2 ]; then
echo "Usage: $0 <model_id> <context_size>"
echo "Example: $0 llama2:latest 8192"
exit 1