Posts

Cleanup logfiles

Montag, 09. August 2021, 16:16 Uhr | roberto@vasquez-angel.de |

shopt -s globstar && rm **/*.log

Setting up a rails development environment on windows with wsl

Samstag, 20. März 2021, 19:25 Uhr | roberto@vasquez-angel.de |

sudo apt-get update

# Install rvm
sudo apt install curl -y
sudo apt install gnupg2 -y
gpg2 --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
\curl -sSL https://get.rvm.io | bash -s stable

# Install ruby
rvm install ruby-3.0.0

# Install zsh/oh-my-zsh
Install zsh from this tutorial: https://kifarunix.com/install-and-setup-zsh-and-oh-my-zsh-on-ubuntu-20-04/

# Install vscode
Install vscode on windows from here: https://code.visualstudio.com/Download
# Install the wsl extension when vscode prompts you
# Restart to be able to run code from any ubuntu terminal

# Install postgres
sudo apt install postgresql -y
sudo apt-get install libpq-dev -y
sudo service postgresql start
sudo -u postgres createuser -s $USER

# Install redis
sudo apt install redis-server -y

# Install node
sudo apt install nodejs -y

# Install npm
sudo apt install npm -y

# Install nvm
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash

# Install yarn
sudo npm install --global yarn

# Install heroku cli
curl https://cli-assets.heroku.com/install.sh | sh

Cleanup RVM

Freitag, 24. Juli 2020, 11:25 Uhr | roberto@vasquez-angel.de |

The hard way (remove all gems):

$ rvm all-gemsets do gem cleanup

Remove stale source files and archives and other obsolete stuff:

$ rvm cleanup all

To avoid duplicate gems enable the gem cache:

$ rvm gemset globalcache enable

Find all tmp folders in actual directory and delete their content (but keep dotfiles)

Freitag, 03. Mai 2019, 09:22 Uhr | roberto@vasquez-angel.de |

find ./ -type d -name "tmp" -execdir rm -rf tmp/* \;

Linux: Run command in all subdirectories

Donnerstag, 28. März 2019, 22:38 Uhr | roberto@vasquez-angel.de |

for d in ./*/ ; do (cd "$d" && ls -al); done

Clear all docker logs

Dienstag, 26. März 2019, 10:20 Uhr | roberto@vasquez-angel.de |

sudo sh -c "truncate -s 0 /var/lib/docker/containers/*/*-json.log"