(define sixhat
  (λ (dave)
    (display 'ideas)))

My approach to managing scratch projects with bash scripts

In R if I just want to test an idea I create a scratch project in /tmp . This will removed automatically on the next boot. This makes it easy to setup scratch folders without leaving much clutter behind. The problem is that the next time you open R after a reboot it will complaint about not finding the previous workspace. I also do the same thing with Markdown files and folders. To help me manage this I have a new_project bash script in my bin folder that goes like this (only .r and .md versions shown but can easily be extended for your needs)

#!/bin/bash
set -euo pipefail

__usage="usage: new_project name <type>

    type can be one of md, r, or any other... and accordingly it should open 
    and setup different folder structures

    name will be the folder name where the project exists.
"

make_folder () {
    mkdir -p "$1"
    cd "$1"
}

project_md (){
    make_folder "$1"
    local today_file="$(date +%F).md"
    if test ! -f "$today_file"; then
        touch "$today_file"
    fi
    open -a "/Applications/Visual Studio Code.app/" "$today_file"
}

project_r (){
    make_folder "$1"
    local today_file="$(date +%F).r"
    if test ! -f "$today_file"; then
        touch "$today_file"
    fi
    open -a "/Applications/RStudio.app" "$today_file"
}

# Start logic bellow this line

if [ "$#" != 2 ]; then
    echo "$__usage"
    exit 1
fi

if [ "$2" = "r" ]; then
    project_r $1
fi

if [ "$2" = "md" ]; then
    project_md $1
fi

  1. Adding something between the lines
  2. Some Games I Like
  3. AI Aesthetics
  4. Random Number Generator, Anyone
  5. veo, i veo google
  6. gpt-4o, the crazy over helpful assistant
  7. teaching physical computing notes
  8. making checklists and ai
  9. refactoring old code scares me
  10. quem não lê é menos livre
  11. haiper video generation
  12. qualcomm ai hub
  13. New macs are rubbish
  14. I'm giving Zed a try
  15. where has my disk space gone?
  16. stealing this one, on how to study
  17. styles for clean bw slides in marp
  18. array based languages
  19. all 2023 posts
  20. added a rss feed
  21. code snippet for highlight.js in markdown pages
  22. is this the only css you'll ever need?
  23. things I'm (re)learning as i play advent of code 2023
  24. spell checker for shell scripts
  25. a simple ps1 bash prompt
  26. axtel and epstein's levels for agent based performance
  27. arduino tip120 demo code for classes
  28. blogs without server side rendering
  29. data science handbook
  30. grimm's odd standard protocol for describing individual-based and agent based models
  31. models of creativity
  32. ants are amazing - what about organizations - reading
  33. creating indices with tree
  34. m3, m3 pro and m3 max
  35. i have to many rss feeds in my reader
  36. finder, explorer, nautilus, rox, ... spacedrive
  37. marginalia in the modern digital world. is it possible?
  38. computer related stuff---how these machines work
  39. disable macbook air autoboot when dis/connecting to power or open lid
  40. red led at 13, blue led at 12 - police lights
  41. the wei (web environment integrity) api proposal from google is dangerous and should not go forward.
  42. my approach to managing scratch projects with bash scripts
  43. avoid long urls extending past the margins of text in latex with xurl
  44. how we learn and how to organise a reading inbox
  45. I am back to social networks, and it is mastodon.
  46. organising stuff is hard until it is not
  47. writing slides structure from the topics slide in marp
  48. a simple css trick 4 dithered images
  49. readings on strange programming, art and electronics
  50. gpt4 experiments - sparks of agi
  51. interesting openstreet use for studying hospital accessibility
  52. a simple js range one-liner
  53. o fim das trotinetes de aluguer?
  54. still reading about ai and gpt and what is next in this space
  55. the ai races for march 22:
  56. two main developments in the ai generators world
  57. and it goes dark
  58. fuzzy logic shell prompt alias
  59. svelte link dump.
  60. senhor clemente, que oportunidade perdida para o arrependimento.
  61. toggling light bulb problem
  62. no arrendamento, quem se lixa é quem cumpre e já aluga
  63. in the slow movement you find great pearls of wisdom.
  64. beja e alverca
  65. websites que funcionam apenas em modo texto
  66. small is beautiful
  67. tools for modern research
  68. and we are in 2023
  69. reading
  70. ai
  71. me