Skip to content

Instantly share code, notes, and snippets.

@dhh
Last active September 23, 2025 13:15
Show Gist options
  • Save dhh/159b129f511f76db3ae8adb463f70d05 to your computer and use it in GitHub Desktop.
Save dhh/159b129f511f76db3ae8adb463f70d05 to your computer and use it in GitHub Desktop.

Revisions

  1. David Heinemeier Hansson revised this gist Jun 10, 2024. 1 changed file with 5 additions and 0 deletions.
    5 changes: 5 additions & 0 deletions linux-setup.sh
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,8 @@
    # THIS LINUX SETUP SCRIPT HAS MORPHED INTO A WHOLE PROJECT: HTTPS://OMAKUB.ORG
    # PLEASE CHECKOUT THAT PROJECT INSTEAD OF THIS OUTDATED SETUP SCRIPT.
    #
    #

    # Libraries and infrastructure
    sudo apt update -y
    sudo apt install -y \
  2. David Heinemeier Hansson revised this gist May 25, 2024. 1 changed file with 3 additions and 0 deletions.
    3 changes: 3 additions & 0 deletions linux-setup.sh
    Original file line number Diff line number Diff line change
    @@ -182,6 +182,9 @@ source ~/.bashrc
    # Setup bash
    cat << EOF >> ~/.bashrc
    alias ls='eza -lh --group-directories-first --icons'
    alias lt='eza --tree --level=2 --long --icons --git'
    alias ff="fzf --preview 'batcat --style=numbers --color=always {}'"
    alias bat='batcat'
    eval "$(zoxide init bash)"
    EOF

  3. David Heinemeier Hansson revised this gist May 25, 2024. 1 changed file with 7 additions and 5 deletions.
    12 changes: 7 additions & 5 deletions linux-setup.sh
    Original file line number Diff line number Diff line change
    @@ -1,19 +1,21 @@
    # CLI
    # Libraries and infrastructure
    sudo apt update -y
    sudo apt install -y \
    git curl fzf eza zoxide \
    docker.io docker-buildx \
    build-essential pkg-config autoconf bison rustc cargo clang \
    libssl-dev libreadline-dev zlib1g-dev libyaml-dev libreadline-dev libncurses5-dev libffi-dev libgdbm-dev libjemalloc2 \
    libvips imagemagick libmagickwand-dev mupdf mupdf-tools \
    redis-tools sqlite3 libsqlite3-0 libmysqlclient-dev \
    rbenv apache2-utils

    # UI apps
    sudo apt install xournalpp nautilus-dropbox alacritty btop
    sudo snap install 1password spotify vlc zoom-client signal-desktop typora pinta
    # CLI apps
    sudo apt install -y git curl fzf ripgrep bat eza zoxide btop
    sudo snap install code zellij --classic

    # GUI apps
    sudo apt install xournalpp nautilus-dropbox alacritty
    sudo snap install 1password spotify vlc zoom-client signal-desktop typora pinta

    # Gnome tweaking
    sudo apt install -y gnome-tweak-tool gnome-shell-extension-manager
    echo "Use Tweak Tool to set Fonts > Size > Scaling Factor: 0.80"
  4. David Heinemeier Hansson revised this gist May 25, 2024. 1 changed file with 8 additions and 0 deletions.
    8 changes: 8 additions & 0 deletions linux-setup.sh
    Original file line number Diff line number Diff line change
    @@ -129,6 +129,14 @@ tar xf lazygit.tar.gz lazygit
    sudo install lazygit /usr/local/bin
    cd -

    # Install lazydocker
    cd ~/Downloads
    LAZYDOCKER_VERSION=$(curl -s "https://api.github.com/repos/jesseduffield/lazydocker/releases/latest" | grep -Po '"tag_name": "v\K[^"]*')
    curl -Lo lazydocker.tar.gz "https://github.com/jesseduffield/lazydocker/releases/latest/download/lazydocker_${LAZYDOCKER_VERSION}_Linux_x86_64.tar.gz"
    tar xf lazydocker.tar.gz lazydocker
    sudo install lazydocker /usr/local/bin
    cd -

    # Install iA Writer theme for Typora
    cd ~/Downloads
    git clone https://github.com/dhh/ia_typora
  5. David Heinemeier Hansson revised this gist May 25, 2024. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion linux-setup.sh
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,7 @@
    # CLI
    sudo apt update -y
    sudo apt install -y \
    git curl fzf eza \
    git curl fzf eza zoxide \
    docker.io docker-buildx \
    build-essential pkg-config autoconf bison rustc cargo clang \
    libssl-dev libreadline-dev zlib1g-dev libyaml-dev libreadline-dev libncurses5-dev libffi-dev libgdbm-dev libjemalloc2 \
    @@ -172,6 +172,7 @@ source ~/.bashrc
    # Setup bash
    cat << EOF >> ~/.bashrc
    alias ls='eza -lh --group-directories-first --icons'
    eval "$(zoxide init bash)"
    EOF

    source ~/.bashrc
  6. David Heinemeier Hansson revised this gist May 23, 2024. 1 changed file with 3 additions and 2 deletions.
    5 changes: 3 additions & 2 deletions linux-setup.sh
    Original file line number Diff line number Diff line change
    @@ -14,8 +14,9 @@ sudo apt install xournalpp nautilus-dropbox alacritty btop
    sudo snap install 1password spotify vlc zoom-client signal-desktop typora pinta
    sudo snap install code zellij --classic

    # Install Gnome Extensions
    sudo apt install -y gnome-shell-extension-manager
    # Gnome tweaking
    sudo apt install -y gnome-tweak-tool gnome-shell-extension-manager
    echo "Use Tweak Tool to set Fonts > Size > Scaling Factor: 0.80"
    echo "Use Extension Manager to install: Tactile, Blur my Shell, Just Perfection"

    # Install chrome
  7. David Heinemeier Hansson revised this gist May 23, 2024. 1 changed file with 9 additions and 1 deletion.
    10 changes: 9 additions & 1 deletion linux-setup.sh
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,7 @@
    # CLI
    sudo apt update -y
    sudo apt install -y \
    git curl fzf \
    git curl fzf eza \
    docker.io docker-buildx \
    build-essential pkg-config autoconf bison rustc cargo clang \
    libssl-dev libreadline-dev zlib1g-dev libyaml-dev libreadline-dev libncurses5-dev libffi-dev libgdbm-dev libjemalloc2 \
    @@ -168,6 +168,14 @@ EOF

    source ~/.bashrc

    # Setup bash
    cat << EOF >> ~/.bashrc
    alias ls='eza -lh --group-directories-first --icons'
    EOF

    source ~/.bashrc


    # Setup GitHub CLI
    curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg \
    && sudo chmod go+r /usr/share/keyrings/githubcli-archive-keyring.gpg \
  8. David Heinemeier Hansson revised this gist May 23, 2024. 1 changed file with 6 additions and 7 deletions.
    13 changes: 6 additions & 7 deletions linux-setup.sh
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,7 @@
    # CLI
    sudo apt update -y
    sudo apt install -y \
    git curl btop \
    git curl fzf \
    docker.io docker-buildx \
    build-essential pkg-config autoconf bison rustc cargo clang \
    libssl-dev libreadline-dev zlib1g-dev libyaml-dev libreadline-dev libncurses5-dev libffi-dev libgdbm-dev libjemalloc2 \
    @@ -10,14 +10,13 @@ sudo apt install -y \
    rbenv apache2-utils

    # UI apps
    sudo apt install xournalpp nautilus-dropbox alacritty
    sudo apt install xournalpp nautilus-dropbox alacritty btop
    sudo snap install 1password spotify vlc zoom-client signal-desktop typora pinta
    sudo snap install code zellij --classic

    # Install Tactile Window Manager via Gnome Extensions
    sudo apt install -y gnome-browser-connector
    open https://chromewebstore.google.com/detail/gnome-shell-integration/gphhapmejobijbbhgpjhcjognlahblep
    open https://extensions.gnome.org/extension/4548/tactile/
    # Install Gnome Extensions
    sudo apt install -y gnome-shell-extension-manager
    echo "Use Extension Manager to install: Tactile, Blur my Shell, Just Perfection"

    # Install chrome
    cd ~/Downloads
    @@ -70,7 +69,7 @@ decorations = "none"
    [font]
    normal = { family = "CaskaydiaMono Nerd Font", style = "Regular" }
    size = 10
    size = 9
    [keyboard]
    bindings = [
  9. David Heinemeier Hansson revised this gist May 22, 2024. 1 changed file with 6 additions and 2 deletions.
    8 changes: 6 additions & 2 deletions linux-setup.sh
    Original file line number Diff line number Diff line change
    @@ -64,8 +64,9 @@ cat << EOF >> ~/.config/alacritty/alacritty.toml
    TERM = "xterm-256color"
    [window]
    padding.x = 3
    padding.y = 3
    padding.x = 16
    padding.y = 14
    decorations = "none"
    [font]
    normal = { family = "CaskaydiaMono Nerd Font", style = "Regular" }
    @@ -102,6 +103,9 @@ blue = '#7da6ff'
    magenta = '#bb9af7'
    cyan = '#0db9d7'
    white = '#acb0d0'
    [colors.selection]
    background = '#7aa2f7'
    EOF

    # Install ulauncher
  10. David Heinemeier Hansson revised this gist May 22, 2024. 1 changed file with 1 addition and 8 deletions.
    9 changes: 1 addition & 8 deletions linux-setup.sh
    Original file line number Diff line number Diff line change
    @@ -25,15 +25,13 @@ wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
    sudo dpkg -i google-chrome-stable_current_amd64.deb
    cd -

    # Install Cascadia Nerd Font (and use it in the terminal)
    # Install Cascadia Nerd Font
    cd ~/Downloads
    wget https://github.com/ryanoasis/nerd-fonts/releases/download/v3.1.1/CascadiaMono.zip
    unzip CascadiaMono.zip -d CascadiaFont
    mkdir -p ~/.local/share/fonts
    cp CascadiaFont/*.ttf ~/.local/share/fonts
    fc-cache
    PROFILE_ID=$(gsettings get org.gnome.Terminal.ProfilesList default | tr -d "'\n")
    gsettings set org.gnome.Terminal.Legacy.Profile:/org/gnome/terminal/legacy/profiles:/:$PROFILE_ID/ font 'CaskaydiaMono Nerd Font 10'
    cd -

    # Configure zellij for Tokyo Night theme
    @@ -175,11 +173,6 @@ curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo
    && sudo apt install gh -y
    gh auth login

    # Setup GitHub Desktop
    wget -qO - https://apt.packages.shiftkey.dev/gpg.key | gpg --dearmor | sudo tee /usr/share/keyrings/shiftkey-packages.gpg > /dev/null
    sudo sh -c 'echo "deb [arch=amd64 signed-by=/usr/share/keyrings/shiftkey-packages.gpg] https://apt.packages.shiftkey.dev/ubuntu/ any main" > /etc/apt/sources.list.d/shiftkey-packages.list'
    sudo apt update && sudo apt install github-desktop

    # Setup Docker
    echo "Add user to docker group (needs restart to become effective)"
    sudo usermod -aG docker ${USER}
  11. David Heinemeier Hansson revised this gist May 21, 2024. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions linux-setup.sh
    Original file line number Diff line number Diff line change
    @@ -117,6 +117,7 @@ sudo add-apt-repository ppa:neovim-ppa/stable
    sudo apt update -y
    sudo apt install -y ripgrep neovim
    git clone https://github.com/LazyVim/starter ~/.config/nvim
    echo "alias n='nvim'" >> ~/.bashrc

    # Install lazygit
    cd ~/Downloads
  12. David Heinemeier Hansson revised this gist May 21, 2024. 1 changed file with 47 additions and 1 deletion.
    48 changes: 47 additions & 1 deletion linux-setup.sh
    Original file line number Diff line number Diff line change
    @@ -10,7 +10,7 @@ sudo apt install -y \
    rbenv apache2-utils

    # UI apps
    sudo apt install xournalpp nautilus-dropbox
    sudo apt install xournalpp nautilus-dropbox alacritty
    sudo snap install 1password spotify vlc zoom-client signal-desktop typora pinta
    sudo snap install code zellij --classic

    @@ -59,6 +59,52 @@ theme "tokyo-night"
    default_layout "compact"
    EOF

    # Configure alacritty for Tokyo Night theme
    mkdir -p ~/.config/alacritty
    cat << EOF >> ~/.config/alacritty/alacritty.toml
    [env]
    TERM = "xterm-256color"
    [window]
    padding.x = 3
    padding.y = 3
    [font]
    normal = { family = "CaskaydiaMono Nerd Font", style = "Regular" }
    size = 10
    [keyboard]
    bindings = [
    { key = "F11", action = "ToggleFullscreen" }
    ]
    [colors]
    [colors.primary]
    background = '#1a1b26'
    foreground = '#a9b1d6'
    # Normal colors
    [colors.normal]
    black = '#32344a'
    red = '#f7768e'
    green = '#9ece6a'
    yellow = '#e0af68'
    blue = '#7aa2f7'
    magenta = '#ad8ee6'
    cyan = '#449dab'
    white = '#787c99'
    # Bright colors
    [colors.bright]
    black = '#444b6a'
    red = '#ff7a93'
    green = '#b9f27c'
    yellow = '#ff9e64'
    blue = '#7da6ff'
    magenta = '#bb9af7'
    cyan = '#0db9d7'
    white = '#acb0d0'
    EOF

    # Install ulauncher
    sudo add-apt-repository universe -y
  13. David Heinemeier Hansson revised this gist May 20, 2024. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions linux-setup.sh
    Original file line number Diff line number Diff line change
    @@ -56,6 +56,7 @@ themes {
    }
    theme "tokyo-night"
    default_layout "compact"
    EOF


  14. David Heinemeier Hansson revised this gist May 20, 2024. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions linux-setup.sh
    Original file line number Diff line number Diff line change
    @@ -143,8 +143,8 @@ mkdir -p $DOCKER_CONFIG/cli-plugins
    curl -SL https://github.com/docker/compose/releases/download/v2.27.0/docker-compose-linux-x86_64 -o $DOCKER_CONFIG/cli-plugins/docker-compose
    chmod +x $DOCKER_CONFIG/cli-plugins/docker-compose

    d run -d --restart unless-stopped -p 3306:3306 --name=mysql8 -e MYSQL_ROOT_PASSWORD= -e MYSQL_ALLOW_EMPTY_PASSWORD=true mysql:8
    d run -d --restart unless-stopped -p 6379:6379 --name=redis redis
    docker run -d --restart unless-stopped -p 3306:3306 --name=mysql8 -e MYSQL_ROOT_PASSWORD= -e MYSQL_ALLOW_EMPTY_PASSWORD=true mysql:8
    docker run -d --restart unless-stopped -p 6379:6379 --name=redis redis

    # Setup nodenv
    git clone https://github.com/nodenv/nodenv.git ~/.nodenv
  15. David Heinemeier Hansson revised this gist May 20, 2024. 1 changed file with 29 additions and 3 deletions.
    32 changes: 29 additions & 3 deletions linux-setup.sh
    Original file line number Diff line number Diff line change
    @@ -10,9 +10,9 @@ sudo apt install -y \
    rbenv apache2-utils

    # UI apps
    sudo snap install 1password spotify vlc zoom-client signal-desktop typora pinta
    sudo apt install xournalpp nautilus-dropbox
    sudo snap install code --classic
    sudo snap install 1password spotify vlc zoom-client signal-desktop typora pinta
    sudo snap install code zellij --classic

    # Install Tactile Window Manager via Gnome Extensions
    sudo apt install -y gnome-browser-connector
    @@ -36,8 +36,34 @@ PROFILE_ID=$(gsettings get org.gnome.Terminal.ProfilesList default | tr -d "'\n"
    gsettings set org.gnome.Terminal.Legacy.Profile:/org/gnome/terminal/legacy/profiles:/:$PROFILE_ID/ font 'CaskaydiaMono Nerd Font 10'
    cd -

    # Configure zellij for Tokyo Night theme
    mkdir -p ~/.config/zellij
    cat << EOF >> ~/.config/zellij/config.kdl
    themes {
    tokyo-night {
    fg 169 177 214
    bg 26 27 38
    black 56 62 90
    red 249 51 87
    green 158 206 106
    yellow 224 175 104
    blue 122 162 247
    magenta 187 154 247
    cyan 42 195 222
    white 192 202 245
    orange 255 158 100
    }
    }
    theme "tokyo-night"
    EOF


    # Install ulauncher
    sudo add-apt-repository universe -y && sudo add-apt-repository ppa:agornostal/ulauncher -y && sudo apt update && sudo apt install ulauncher
    sudo add-apt-repository universe -y
    sudo add-apt-repository ppa:agornostal/ulauncher -y
    sudo apt update
    sudo apt install ulauncher

    # Install neovim w/ lazyvim
    sudo add-apt-repository ppa:neovim-ppa/stable
  16. David Heinemeier Hansson revised this gist May 19, 2024. 1 changed file with 15 additions and 1 deletion.
    16 changes: 15 additions & 1 deletion linux-setup.sh
    Original file line number Diff line number Diff line change
    @@ -19,7 +19,7 @@ sudo apt install -y gnome-browser-connector
    open https://chromewebstore.google.com/detail/gnome-shell-integration/gphhapmejobijbbhgpjhcjognlahblep
    open https://extensions.gnome.org/extension/4548/tactile/

    # Install debs
    # Install chrome
    cd ~/Downloads
    wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
    sudo dpkg -i google-chrome-stable_current_amd64.deb
    @@ -39,6 +39,20 @@ cd -
    # Install ulauncher
    sudo add-apt-repository universe -y && sudo add-apt-repository ppa:agornostal/ulauncher -y && sudo apt update && sudo apt install ulauncher

    # Install neovim w/ lazyvim
    sudo add-apt-repository ppa:neovim-ppa/stable
    sudo apt update -y
    sudo apt install -y ripgrep neovim
    git clone https://github.com/LazyVim/starter ~/.config/nvim

    # Install lazygit
    cd ~/Downloads
    LAZYGIT_VERSION=$(curl -s "https://api.github.com/repos/jesseduffield/lazygit/releases/latest" | grep -Po '"tag_name": "v\K[^"]*')
    curl -Lo lazygit.tar.gz "https://github.com/jesseduffield/lazygit/releases/latest/download/lazygit_${LAZYGIT_VERSION}_Linux_x86_64.tar.gz"
    tar xf lazygit.tar.gz lazygit
    sudo install lazygit /usr/local/bin
    cd -

    # Install iA Writer theme for Typora
    cd ~/Downloads
    git clone https://github.com/dhh/ia_typora
  17. David Heinemeier Hansson revised this gist May 18, 2024. 1 changed file with 14 additions and 21 deletions.
    35 changes: 14 additions & 21 deletions linux-setup.sh
    Original file line number Diff line number Diff line change
    @@ -14,10 +14,6 @@ sudo snap install 1password spotify vlc zoom-client signal-desktop typora pinta
    sudo apt install xournalpp nautilus-dropbox
    sudo snap install code --classic

    # Tuxedo specific setup
    # https://deb.tuxedocomputers.com/ubuntu/pool/main/t/tuxedo-control-center/
    # https://deb.tuxedocomputers.com/ubuntu/pool/main/t/tuxedo-drivers/

    # Install Tactile Window Manager via Gnome Extensions
    sudo apt install -y gnome-browser-connector
    open https://chromewebstore.google.com/detail/gnome-shell-integration/gphhapmejobijbbhgpjhcjognlahblep
    @@ -60,9 +56,6 @@ git clone https://github.com/rbenv/ruby-build.git "$(rbenv root)"/plugins/ruby-b
    rbenv install 3.3.1
    rbenv global 3.3.1

    # No root PW for MySQL for development
    sudo mysql -e "ALTER USER 'root'@'localhost' IDENTIFIED WITH caching_sha2_password BY ''"

    # Binstubs
    cat << EOF >> ~/.bashrc
    export PATH="./bin:$PATH"
    @@ -99,6 +92,20 @@ wget -qO - https://apt.packages.shiftkey.dev/gpg.key | gpg --dearmor | sudo tee
    sudo sh -c 'echo "deb [arch=amd64 signed-by=/usr/share/keyrings/shiftkey-packages.gpg] https://apt.packages.shiftkey.dev/ubuntu/ any main" > /etc/apt/sources.list.d/shiftkey-packages.list'
    sudo apt update && sudo apt install github-desktop

    # Setup Docker
    echo "Add user to docker group (needs restart to become effective)"
    sudo usermod -aG docker ${USER}
    echo "alias d='docker'" >> ~/.bashrc
    source ~/.bashrc

    DOCKER_CONFIG=${DOCKER_CONFIG:-$HOME/.docker}
    mkdir -p $DOCKER_CONFIG/cli-plugins
    curl -SL https://github.com/docker/compose/releases/download/v2.27.0/docker-compose-linux-x86_64 -o $DOCKER_CONFIG/cli-plugins/docker-compose
    chmod +x $DOCKER_CONFIG/cli-plugins/docker-compose

    d run -d --restart unless-stopped -p 3306:3306 --name=mysql8 -e MYSQL_ROOT_PASSWORD= -e MYSQL_ALLOW_EMPTY_PASSWORD=true mysql:8
    d run -d --restart unless-stopped -p 6379:6379 --name=redis redis

    # Setup nodenv
    git clone https://github.com/nodenv/nodenv.git ~/.nodenv
    sudo ln -vs ~/.nodenv/bin/nodenv /usr/local/bin/nodenv
    @@ -113,17 +120,3 @@ nodenv global 20.11.1
    sudo ln -vs $(nodenv root)/shims/* /usr/local/bin/
    echo 'eval "$(nodenv init -)"' >> ~/.bashrc
    source ~/.bashrc

    # Setup Docker
    echo "Add user to docker group (needs restart to become effective)"
    sudo usermod -aG docker ${USER}
    echo "alias d='docker'" >> ~/.bashrc
    source ~/.bashrc

    DOCKER_CONFIG=${DOCKER_CONFIG:-$HOME/.docker}
    mkdir -p $DOCKER_CONFIG/cli-plugins
    curl -SL https://github.com/docker/compose/releases/download/v2.27.0/docker-compose-linux-x86_64 -o $DOCKER_CONFIG/cli-plugins/docker-compose
    chmod +x $DOCKER_CONFIG/cli-plugins/docker-compose

    d run -d --restart unless-stopped -p 3306:3306 --name=mysql8 -e MYSQL_ROOT_PASSWORD= -e MYSQL_ALLOW_EMPTY_PASSWORD=true mysql:8
    d run -d --restart unless-stopped -p 6379:6379 --name=redis redis
  18. David Heinemeier Hansson revised this gist May 18, 2024. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions linux-setup.sh
    Original file line number Diff line number Diff line change
    @@ -49,6 +49,7 @@ git clone https://github.com/dhh/ia_typora
    mkdir -p ~/.local/share/fonts
    cp ia_typora/fonts/iAWriterMonoS-* ~/.local/share/fonts/
    fc-cache
    mkdir -p ~/snap/typora/88/.config/Typora/themes/
    cp ia_typora/ia_typora*.css ~/snap/typora/88/.config/Typora/themes/
    cd -

  19. David Heinemeier Hansson revised this gist May 18, 2024. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion linux-setup.sh
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,7 @@
    # CLI
    sudo apt update -y
    sudo apt install -y \
    git curl \
    git curl btop \
    docker.io docker-buildx \
    build-essential pkg-config autoconf bison rustc cargo clang \
    libssl-dev libreadline-dev zlib1g-dev libyaml-dev libreadline-dev libncurses5-dev libffi-dev libgdbm-dev libjemalloc2 \
  20. David Heinemeier Hansson revised this gist May 13, 2024. 1 changed file with 6 additions and 1 deletion.
    7 changes: 6 additions & 1 deletion linux-setup.sh
    Original file line number Diff line number Diff line change
    @@ -113,11 +113,16 @@ sudo ln -vs $(nodenv root)/shims/* /usr/local/bin/
    echo 'eval "$(nodenv init -)"' >> ~/.bashrc
    source ~/.bashrc

    # Setup Docker accessories
    # Setup Docker
    echo "Add user to docker group (needs restart to become effective)"
    sudo usermod -aG docker ${USER}
    echo "alias d='docker'" >> ~/.bashrc
    source ~/.bashrc

    DOCKER_CONFIG=${DOCKER_CONFIG:-$HOME/.docker}
    mkdir -p $DOCKER_CONFIG/cli-plugins
    curl -SL https://github.com/docker/compose/releases/download/v2.27.0/docker-compose-linux-x86_64 -o $DOCKER_CONFIG/cli-plugins/docker-compose
    chmod +x $DOCKER_CONFIG/cli-plugins/docker-compose

    d run -d --restart unless-stopped -p 3306:3306 --name=mysql8 -e MYSQL_ROOT_PASSWORD= -e MYSQL_ALLOW_EMPTY_PASSWORD=true mysql:8
    d run -d --restart unless-stopped -p 6379:6379 --name=redis redis
  21. David Heinemeier Hansson revised this gist May 12, 2024. 1 changed file with 4 additions and 2 deletions.
    6 changes: 4 additions & 2 deletions linux-setup.sh
    Original file line number Diff line number Diff line change
    @@ -114,8 +114,10 @@ echo 'eval "$(nodenv init -)"' >> ~/.bashrc
    source ~/.bashrc

    # Setup Docker accessories
    echo "alias d='sudo docker'" >> ~/.bashrc
    echo "Add user to docker group (needs restart to become effective)"
    sudo usermod -aG docker ${USER}
    echo "alias d='docker'" >> ~/.bashrc
    source ~/.bashrc

    d run -d --restart unless-stopped -p 3308:3306 --name=mysql8 -e MYSQL_ROOT_PASSWORD= -e MYSQL_ALLOW_EMPTY_PASSWORD=true mysql:8
    d run -d --restart unless-stopped -p 3306:3306 --name=mysql8 -e MYSQL_ROOT_PASSWORD= -e MYSQL_ALLOW_EMPTY_PASSWORD=true mysql:8
    d run -d --restart unless-stopped -p 6379:6379 --name=redis redis
  22. David Heinemeier Hansson revised this gist May 10, 2024. 1 changed file with 1 addition and 4 deletions.
    5 changes: 1 addition & 4 deletions linux-setup.sh
    Original file line number Diff line number Diff line change
    @@ -11,7 +11,7 @@ sudo apt install -y \

    # UI apps
    sudo snap install 1password spotify vlc zoom-client signal-desktop typora pinta
    sudo apt install xournalpp
    sudo apt install xournalpp nautilus-dropbox
    sudo snap install code --classic

    # Tuxedo specific setup
    @@ -27,9 +27,6 @@ open https://extensions.gnome.org/extension/4548/tactile/
    cd ~/Downloads
    wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
    sudo dpkg -i google-chrome-stable_current_amd64.deb
    wget -O dropbox_2020.03.04_amd64.deb https://www.dropbox.com/download?dl=packages/ubuntu/dropbox_2020.03.04_amd64.deb
    sudo apt install libpango1.0-0 -y
    sudo dpkg -i dropbox_2020.03.04_amd64.deb
    cd -

    # Install Cascadia Nerd Font (and use it in the terminal)
  23. David Heinemeier Hansson revised this gist May 7, 2024. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions linux-setup.sh
    Original file line number Diff line number Diff line change
    @@ -59,8 +59,8 @@ cd -
    echo 'eval "$(/usr/bin/rbenv init - bash)"' >> ~/.bashrc
    source ~/.bashrc
    git clone https://github.com/rbenv/ruby-build.git "$(rbenv root)"/plugins/ruby-build
    rbenv install 3.3.0
    rbenv global 3.3.0
    rbenv install 3.3.1
    rbenv global 3.3.1

    # No root PW for MySQL for development
    sudo mysql -e "ALTER USER 'root'@'localhost' IDENTIFIED WITH caching_sha2_password BY ''"
  24. David Heinemeier Hansson revised this gist Apr 29, 2024. 1 changed file with 1 addition and 2 deletions.
    3 changes: 1 addition & 2 deletions linux-setup.sh
    Original file line number Diff line number Diff line change
    @@ -120,6 +120,5 @@ source ~/.bashrc
    echo "alias d='sudo docker'" >> ~/.bashrc
    source ~/.bashrc

    # d run -d -p 3308:3306 --name=mysql8 -e MYSQL_ROOT_PASSWORD= -e MYSQL_ALLOW_EMPTY_PASSWORD=true mysql:8 --restart unless-stopped
    d run -d --restart unless-stopped -p 3306:3306 --name=mysql5.7 -e MYSQL_ROOT_PASSWORD= -e MYSQL_ALLOW_EMPTY_PASSWORD=true mysql:5.7
    d run -d --restart unless-stopped -p 3308:3306 --name=mysql8 -e MYSQL_ROOT_PASSWORD= -e MYSQL_ALLOW_EMPTY_PASSWORD=true mysql:8
    d run -d --restart unless-stopped -p 6379:6379 --name=redis redis
  25. David Heinemeier Hansson revised this gist Apr 29, 2024. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion linux-setup.sh
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,8 @@
    # CLI
    sudo apt update -y
    sudo apt install -y \
    git curl docker.io \
    git curl \
    docker.io docker-buildx \
    build-essential pkg-config autoconf bison rustc cargo clang \
    libssl-dev libreadline-dev zlib1g-dev libyaml-dev libreadline-dev libncurses5-dev libffi-dev libgdbm-dev libjemalloc2 \
    libvips imagemagick libmagickwand-dev mupdf mupdf-tools \
  26. David Heinemeier Hansson revised this gist Apr 28, 2024. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion linux-setup.sh
    Original file line number Diff line number Diff line change
    @@ -51,7 +51,7 @@ git clone https://github.com/dhh/ia_typora
    mkdir -p ~/.local/share/fonts
    cp ia_typora/fonts/iAWriterMonoS-* ~/.local/share/fonts/
    fc-cache
    cp ia_typora/ia_typora*.css ~/snap/typora/86/.config/Typora/themes/
    cp ia_typora/ia_typora*.css ~/snap/typora/88/.config/Typora/themes/
    cd -

    # Ruby
  27. David Heinemeier Hansson revised this gist Apr 28, 2024. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion linux-setup.sh
    Original file line number Diff line number Diff line change
    @@ -4,7 +4,7 @@ sudo apt install -y \
    git curl docker.io \
    build-essential pkg-config autoconf bison rustc cargo clang \
    libssl-dev libreadline-dev zlib1g-dev libyaml-dev libreadline-dev libncurses5-dev libffi-dev libgdbm-dev libjemalloc2 \
    libvips imagemagick libmagickwand-dev \
    libvips imagemagick libmagickwand-dev mupdf mupdf-tools \
    redis-tools sqlite3 libsqlite3-0 libmysqlclient-dev \
    rbenv apache2-utils

  28. David Heinemeier Hansson revised this gist Apr 26, 2024. 1 changed file with 3 additions and 2 deletions.
    5 changes: 3 additions & 2 deletions linux-setup.sh
    Original file line number Diff line number Diff line change
    @@ -8,8 +8,9 @@ sudo apt install -y \
    redis-tools sqlite3 libsqlite3-0 libmysqlclient-dev \
    rbenv apache2-utils

    # UI apps
    sudo snap install 1password spotify vlc zoom-client signal-desktop typora
    # UI apps
    sudo snap install 1password spotify vlc zoom-client signal-desktop typora pinta
    sudo apt install xournalpp
    sudo snap install code --classic

    # Tuxedo specific setup
  29. David Heinemeier Hansson revised this gist Mar 31, 2024. 1 changed file with 11 additions and 8 deletions.
    19 changes: 11 additions & 8 deletions linux-setup.sh
    Original file line number Diff line number Diff line change
    @@ -64,8 +64,11 @@ rbenv global 3.3.0
    sudo mysql -e "ALTER USER 'root'@'localhost' IDENTIFIED WITH caching_sha2_password BY ''"

    # Binstubs
    echo 'export PATH="./bin:$PATH"' >> ~/.bashrc
    echo 'set +h' >> ~/.bashrc
    cat << EOF >> ~/.bashrc
    export PATH="./bin:$PATH"
    set +h
    alias r='./bin/rails'
    EOF

    # Setup git aliases
    git config --global alias.co checkout
    @@ -74,13 +77,13 @@ git config --global alias.ci commit
    git config --global alias.st status
    git config --global pull.rebase true

    echo "alias g='git'" >> ~/.bashrc
    echo "alias gcm='git commit -m'" >> ~/.bashrc
    echo "alias gcam='git commit -a -m'" >> ~/.bashrc
    echo "alias gcad='git commit -a --amend'" >> ~/.bashrc
    cat << EOF >> ~/.bashrc
    alias g='git'
    alias gcm='git commit -m'
    alias gcam='git commit -a -m'
    alias gcad='git commit -a --amend'
    EOF

    # Setup other aliases
    echo "alias r='./bin/rails'" >> ~/.bashrc
    source ~/.bashrc

    # Setup GitHub CLI
  30. David Heinemeier Hansson revised this gist Mar 31, 2024. 1 changed file with 3 additions and 3 deletions.
    6 changes: 3 additions & 3 deletions linux-setup.sh
    Original file line number Diff line number Diff line change
    @@ -17,9 +17,9 @@ sudo snap install code --classic
    # https://deb.tuxedocomputers.com/ubuntu/pool/main/t/tuxedo-drivers/

    # Install Tactile Window Manager via Gnome Extensions
    # sudo apt install gnome-browser-connector
    # https://chromewebstore.google.com/detail/gnome-shell-integration/gphhapmejobijbbhgpjhcjognlahblep
    # https://extensions.gnome.org/extension/4548/tactile/
    sudo apt install -y gnome-browser-connector
    open https://chromewebstore.google.com/detail/gnome-shell-integration/gphhapmejobijbbhgpjhcjognlahblep
    open https://extensions.gnome.org/extension/4548/tactile/

    # Install debs
    cd ~/Downloads