Skip to content

Instantly share code, notes, and snippets.

@vinimonteiro
vinimonteiro / pom.xml
Created February 1, 2021 18:11
Maven jar plugin used to generate the full fat jar containing pom.xml
.....
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>jar</goal>
@vinimonteiro
vinimonteiro / pom.xml
Last active February 1, 2021 20:09
Maven install plugin sample
.......
<dependency>
<groupId>com.vinimo</groupId>
<artifactId>utility-service</artifactId>
<version>0.0.1</version>
</dependency>
......
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-install-plugin</artifactId>
@vinimonteiro
vinimonteiro / python_terminal_example
Created February 4, 2021 20:05
Python Terminal Example
(base) Viniciuss-MacBook-Pro:main-service viniciusmonteiro$ python
Python 3.8.3 (default, Jul 2 2020, 11:26:31)
[Clang 10.0.0 ] :: Anaconda, Inc. on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> print("Hello World")
Hello World
>>>
@vinimonteiro
vinimonteiro / ruby_example_terminal
Created February 4, 2021 20:07
Ruby Example Terminal
(base) Viniciuss-MacBook-Pro:main-service viniciusmonteiro$ irb
irb(main):001:0> puts "Hello World"
Hello World
=> nil
irb(main):002:0>
@vinimonteiro
vinimonteiro / dynamically_type_test
Created February 5, 2021 15:24
Dynamically type test
(base) Viniciuss-MacBook-Pro:main-service viniciusmonteiro$ python
Python 3.8.3 (default, Jul 2 2020, 11:26:31)
[Clang 10.0.0 ] :: Anaconda, Inc. on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> b = 1
>>> print(b)
1
>>> b = "test"
>>> print(b)
test
@vinimonteiro
vinimonteiro / statically_type.java
Created February 5, 2021 15:29
statically_type
public static void main(String[] args) {
String b = "test";
System.out.println(b);
}
@vinimonteiro
vinimonteiro / simple_loop
Last active February 6, 2021 16:57
simple loop
>>> squares = []
>>> for i in range(6):
... squares.append(i*i)
...
>>> squares
[0, 1, 4, 9, 16, 25]
@vinimonteiro
vinimonteiro / list_comprehensions
Created February 6, 2021 16:57
list comprehensions
>>> squares = [i*i for i in range(6)]
>>> squares
[0, 1, 4, 9, 16, 25]
@vinimonteiro
vinimonteiro / set_comprehensions
Created February 6, 2021 17:56
set comprehensions
>>> squares = {i*i for i in range(6)}
>>> squares
{0, 1, 4, 9, 16, 25}
@vinimonteiro
vinimonteiro / dict_comprehension
Created February 6, 2021 17:57
dict comprehension
>>> squares = {i:i*i for i in range(6)}
>>> squares
{0: 0, 1: 1, 2: 4, 3: 9, 4: 16, 5: 25}