George Opritescu

Developer from somewhere

git multiple worktrees

This checks out the branch called

1
devel
in a folder called
1
dev-code
. It makes it easy to keep track of multiple branches of your project without having to have multiple clones, or to keep switching from one branch to the other :

git worktree add dev-code devel
Read More
git

using rvm from a shell agent

The following worked for me:

{
  "path": "/home/geo/code/capy-extractor",
  "command": "BUNDLE_GEMFILE=/home/geo/code/capy-extractor/Gemfile /bin/bash -c '/home/geo/code/capy-extractor/wrapper.sh'",
  "suppress_on_failure": false,
  "suppress_on_empty_output": false,
  "expected_update_period_in_days": 1
}

and wrapper.sh:

#!/bin/bash -l
set -e

source $HOME/.bashrc
cd ~/code/capy-extractor
rvm use ruby-2.3.0@polty
ruby your-script.rb args
Read More

git grep by commit msg

git log --all --grep="Some msg"
Read More
git

vimrc per project

Add this to your .vimrc file:

set exrc
Read More
vim

Println debugging go libs

Easy Println debugging:

  • remove the lib’s pkg folder from $GOPATH
  • add your debugging statements
  • rebuild
  • run
  • identify problem
  • revert original lib code
Read More

allow permanent access to any app to your google account

This link allows permanent access to any app to your google account for 10 min.

Read More

view version of a file from a certain git branch

For example to view how app/models/user.rb looks on branch name_of_branch:

git show name_of_branch:app/models/user.rb
Read More
git