Skip to content

Instantly share code, notes, and snippets.

View markthomas93's full-sized avatar

Mark Thomas markthomas93

  • freelance
  • California
View GitHub Profile
@markthomas93
markthomas93 / gpt4_abbreviations.md
Created April 3, 2023 20:58 — forked from VictorTaelin/gpt4_abbreviations.md
Notes on the GPT-4 abbreviations tweet

Notes on this tweet.

  • The screenshots were taken on different sessions.

  • The entire sessions are included on the screenshots.

  • I lost the original prompts, so I had to reconstruct them, and still managed to reproduce.

  • The "compressed" version is actually longer! Emojis and abbreviations use more tokens than common words.

This is a work in progress, proceed with caution

Install Proxmox and a Ubuntu VM with Portainer to manage docker containers

Setup Proxmox

  1. Install Proxmox 6.X iso I selected 2 drives in Raid 1 mirror
  2. Console/SSH into Proxmox
  3. nano /etc/apt/sources.list
@markthomas93
markthomas93 / surf.darkmode.default.css
Created November 24, 2022 09:50
surf.darkmode.default.css
*,div,pre,textarea,body,input,td,tr,p {
background-color: #202020 !important;
background-image: none !important;
color: #bbbbbb !important;
}
h1,h2,h3,h4 {
background-color: #202020 !important;
color: #b8ddea !important;
}
img {

Tested only on Ubuntu 20.04, KDE Neon User Edition (based on Ubuntu 20.04) and OSX Mojave.

will probably work on other newer versions, with no changes, or with few changes in non-python dependencies (apt-get packages)

NOTE: Don't create a .sh file and run it all at once. It will not work. Copy, paste, and execute each command below manually. :-)

Ubuntu

# DO NOT RUN THIS AS A ROOT USER
@markthomas93
markthomas93 / pyenv.install.sh
Created June 28, 2022 16:21
pyenv.install.sh
#!/usr/bin/env bash
set -e
[ -n "$PYENV_DEBUG" ] && set -x
if [ -z "$PYENV_ROOT" ]; then
export PYENV_ROOT="${HOME}/.pyenv"
fi
@markthomas93
markthomas93 / gitpod.profile
Created June 21, 2022 18:18
gitpod.profile
### --- Start Of GitPod Default --- ###
# ~/.profile: executed by the command interpreter for login shells.
# This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login
# exists.
# see /usr/share/doc/bash/examples/startup-files for examples.
# the files are located in the bash-doc package.
# the default umask is set in /etc/profile; for setting the umask
# for ssh logins, install and configure the libpam-umask package.
#umask 022
@markthomas93
markthomas93 / crystal-disk-mark-fio-bench.sh
Created June 18, 2022 04:08 — forked from O1ahmad/crystal-disk-mark-fio-bench.sh
CrystalDiskMark-esque Disk Benchmark (using fio)
#!/bin/bash
LOOPS=5 #How many times to run each test
SIZE=1024 #Size of each test, multiples of 32 recommended for Q32 tests to give the most accurate results.
WRITEZERO=0 #Set whether to write zeroes or randoms to testfile (random is the default for both fio and crystaldiskmark); dd benchmarks typically only write zeroes which is why there can be a speed difference.
QSIZE=$(($SIZE / 32)) #Size of Q32Seq tests
SIZE+=m
QSIZE+=m
@markthomas93
markthomas93 / cdm_fio.sh
Created June 18, 2022 04:08 — forked from Lykos153/cdm_fio.sh
Reproducing CrystalDiskMark tests with fio - fixes for https://unix.stackexchange.com/revisions/480191/9
#!/bin/bash
# This script is based on https://unix.stackexchange.com/revisions/480191/9 .
# The following changes proved to be necessary to make it work on CentOS 7:
# * removed disk info (model, size) - not very useful, might not work in many cases.
# * using "bw" instead of "bw_bytes" to support fio version 3.1 (those availible through yum @base)
# * escaping exclamation mark in sed command
# * the ".fiomark.txt" is not auto-removed
LOOPS=5 #How many times to run each test
@markthomas93
markthomas93 / fio.crystal.disk.speed.test.script.sh
Created June 18, 2022 03:47
fio.crystal.disk.speed.test.script.sh
#!/bin/bash
if [ -f /usr/bin/fio ] && [ -f /usr/bin/df ]; then #Dependency check
:
else
echo -e "\033[1;31mError: This script requires fio and df to run, please make sure both are installed."
exit
fi
echo "What drive do you want to test? (Default: $HOME on /dev/$(df $HOME | grep /dev | cut -d/ -f3 | cut -d" " -f1) )"
@markthomas93
markthomas93 / cdm_fio.sh
Created June 18, 2022 03:37 — forked from snizovtsev/cdm_fio.sh
Reproducing CrystalDiskMark tests with fio - fixes for https://unix.stackexchange.com/revisions/480191/9
#!/bin/bash
# This script is based on https://unix.stackexchange.com/revisions/480191/9 .
# The following changes proved to be necessary to make it work on CentOS 7:
# * removed disk info (model, size) - not very useful, might not work in many cases.
# * using "bw" instead of "bw_bytes" to support fio version 3.1 (those availible through yum @base)
# * escaping exclamation mark in sed command
# * the ".fiomark.txt" is not auto-removed
LOOPS=5 #How many times to run each test