Feature | Spring | Weld | Micronaut |
---|---|---|---|
Managed bean | @Component | @ApplicationScoped | @Singleton |
Injection | @Autowired | @Inject | @Inject |
Factory method | @Bean | @Produce | @Bean |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class MyDependency extends AbstractVerticle { | |
@Override | |
public void start() { | |
vertx.eventBus() | |
.consumer("my", (message) -> { | |
message.reply("bar"); | |
}); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class MyCoreClass extends AbstractVerticle { | |
@Override | |
public void start() { | |
vertx.eventBus() | |
.consumer("core", (message) -> { | |
vertx.eventBus().send("my", "get", handler -> { | |
message.reply("foo" + | |
handler.result().body().toString()); | |
}); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mvn archetype:generate \ | |
-DgroupId=com.github.fabiojose.hello.scala \ | |
-DartifactId=hello-scala \ | |
-DarchetypeGroupId=net.alchim31.maven \ | |
-DarchetypeArtifactId=scala-archetype-simple \ | |
-DarchetypeVersion=1.7 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
OLD_REPO=<OLD_REPO_URL> | |
NEW_REPO=<NEW_REPO_URL> | |
git clone --mirror $OLD_REPO | |
cd <Old repo directory> | |
git remote set-url origin $NEW_REPO | |
git push -f origin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ORIGIN=<ORIGIN_REPO_URL> | |
MIRROR1=<MIRROR_REPO_URL> | |
git clone --bare $ORIGIN | |
cd $ORIGIN | |
git remote add --mirror=fetch mirror1 $MIRROR1 | |
git fetch origin --tags | |
git push mirror1 --all | |
git push mirror1 --tags |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo umount /dev/sdX | |
sudo dd if=/path/to/ubuntu.iso of=/dev/sdX bs=4M && sync |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
./node_modules/.bin/istanbul \ | |
cover _mocha \ | |
--report lcovonly \ | |
-- -R spec \ | |
&& cat ./coverage/lcov.info \ | |
| ./node_modules/.bin/codacy-coverage \ | |
&& rm -rf ./coverage | |
travis encrypt CODACY_PROJECT_TOKEN="<YOUR CODACY TOKEN>" --add |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
termtosvg ~/Videos/archetype.svg -g 80x24 -t window_frame_js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo update-alternatives \ | |
--install \ | |
/usr/bin/python \ | |
python \ | |
/usr/bin/python2.7 \ | |
1 | |
sudo update-alternatives \ | |
--install \ | |
/usr/bin/python \ |