Skip to content

Instantly share code, notes, and snippets.

View fabiojose's full-sized avatar
🎯
Focusing

Fabio Jose fabiojose

🎯
Focusing
  • São Paulo, Brazil
  • 19:32 (UTC -03:00)
View GitHub Profile
@fabiojose
fabiojose / MyDependency.java
Last active May 15, 2019 17:45
MyDependency
public class MyDependency extends AbstractVerticle {
@Override
public void start() {
vertx.eventBus()
.consumer("my", (message) -> {
message.reply("bar");
});
}
}
@fabiojose
fabiojose / MyCoreClass.java
Last active May 15, 2019 17:42
MyCoreClass
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());
});
});
@fabiojose
fabiojose / di-frameworks.md
Created May 15, 2019 00:15
di-frameworks
Feature Spring Weld Micronaut
Managed bean @Component @ApplicationScoped @Singleton
Injection @Autowired @Inject @Inject
Factory method @Bean @Produce @Bean
mvn archetype:generate \
-DgroupId=com.github.fabiojose.hello.scala \
-DartifactId=hello-scala \
-DarchetypeGroupId=net.alchim31.maven \
-DarchetypeArtifactId=scala-archetype-simple \
-DarchetypeVersion=1.7
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
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
sudo umount /dev/sdX
sudo dd if=/path/to/ubuntu.iso of=/dev/sdX bs=4M && sync
./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
@fabiojose
fabiojose / term.sh
Last active December 3, 2018 14:50
termtosvg ~/Videos/archetype.svg -g 80x24 -t window_frame_js
sudo update-alternatives \
--install \
/usr/bin/python \
python \
/usr/bin/python2.7 \
1
sudo update-alternatives \
--install \
/usr/bin/python \