ignore commits by an author in git log
This would show all commits where the author does not contain George:
git log --perl-regexp --author='^((?!George).*)$'
parallelize with space separated args with xargs
echo "node0 node1 node2" | xargs -n1 -P3 -IBOX sh -c 'vagrant halt BOX'
disable parameter wrapping in rails
Add a wrap_parameters false in your controller, if you need to get rid of the extra hash wrapped around your params.
iterm2 commands
- View frequent directories:
1
cmd-alt-/
- Get notification when a command finishes:
1
cmd-alt-a
- Make current split take entire screen:
1
cmd-shift-enter
using maven exec to run a class in a multi module maven setup
Had the following structure:
project/ tests/ pom.xml integration-tests/ pom.xml src test java Potato.java ...
and I wanted to run the Potato class using maven exec. The following command did the trick:
mvn -Dexec.mainClass="my.pkg.Potato" -Dexec.classpathScope=test exec:java -pl tests/integration-tests
No Directive annotation found on AppComponent
Received the following exception when following the “Tour of heroes” app quickstart:
No Directive annotation found on AppComponent
Turned out, my code was like this:
when it should have been like this:
notice the annotation has to be on the AppComponent class.