Skip to content

Instantly share code, notes, and snippets.

@peteristhegreat
peteristhegreat / julia-powershell-expression-notes.md
Last active September 25, 2024 19:56
Julia, pass -e script in powershell

After much todo, trying to get powershell to run julia like it would in bash, I got this working:

& julia -i -e ('println(\"Hello World\")')


& julia -i -e ('include(\"path-to-script.jl\"); function_in_script(); exit()')

& julia -i -e "path-to-script.jl"
@peteristhegreat
peteristhegreat / progress-bar-and-spinner.jl
Created September 20, 2024 19:54
Julia progress bar and spinner from Pkg, no additional packages needed
using Pkg
using Pkg.MiniProgressBars
# Function that simulates a task with progress
function example_task_with_progress_bar(n::Int)
bar = MiniProgressBar(; indent=2, header="Processing items", color=Base.info_color())
bar.max = n
fancyprint = Pkg.can_fancyprint(stderr)
fancyprint && start_progress(stderr, bar)
@peteristhegreat
peteristhegreat / how-to-upgrade-to-windows-11.md
Created September 17, 2024 15:30
Windows 11, Parallels, TPM Chip, Not recognized
@peteristhegreat
peteristhegreat / amazon-linux-2023--certbot-nginx.md
Last active September 13, 2024 15:02
Amazon Linux 2023, Centos based certbot + nginx setup
sudo yum update
sudo yum install -y docker nginx certbot python3-certbot-nginx git

sudo systemctl start docker
sudo systemctl enable docker
sudo usermod -a -G docker ec2-user

sudo systemctl start nginx
@peteristhegreat
peteristhegreat / rpi-3b-plus-setup-2024.md
Created September 9, 2024 22:51
RPI-3b+ Setup 2024
@peteristhegreat
peteristhegreat / mod-fortune.md
Created September 5, 2024 18:34
Install mod-fortune with lots of extras

I didn't want to deal with translations nor with 2 GB of libraries I don't need, so my trimmed list for english + spanish fortunes was:

sudo apt install display-dhammapada fortune-anarchism fortune-mod fortunes fortunes-bofh-excuses fortunes-debian-hints fortunes-es fortunes-es-off fortunes-mario fortunes-min fortunes-off fortunes-spam haskell-misfortune tfortune tfortunes

Afterward I got this spread of topics:

$ fortune -f
@peteristhegreat
peteristhegreat / internal-khanmigo-thoughts.md
Last active August 9, 2024 14:39
Internal Khanmigo Thoughts

Slide from: https://youtu.be/hJP5GqnTrNo?feature=shared&t=740

GPT-4 clearly has the capability, but the context you give it matters a lot!

We have:

  • Used “AI Thoughts”
  • Give it the context of the problem (including human generated hints)
  • Spent 6 months prompt engineering for tutoring with an emphasis on math