Skip to content

Instantly share code, notes, and snippets.

💭
😏

Pietro Di Bello xpepper

💭
😏
Block or report user

Report or block xpepper

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View build folder.md
build/
    classes
          kotlin
    jacoco
          test.exec
    reports
          jacoco
View build folder.md
build/
    classes
          kotlin
    jacoco
          test.exec
    ...          
@xpepper
xpepper / Adding Jacoco code coverage measurement to a Kotlin Gradle project (and then adding coverage reports on a Jenkins pipeline).md
Created Oct 13, 2019
Adding Jacoco code coverage measurement to a Kotlin Gradle project (and then adding coverage reports on a Jenkins pipeline)
View Adding Jacoco code coverage measurement to a Kotlin Gradle project (and then adding coverage reports on a Jenkins pipeline).md

Add code coverage to a gradle project

In order to have code coverage measurement enabled on your gradle project, you have to just add the jacoco plugin to the build.gradle plugin section

plugins {
    ...
    id 'jacoco'
}
@xpepper
xpepper / jbrains.md
Created Aug 18, 2019
What your tests don’t need to know will hurt you
View jbrains.md
View learning-javascript.md

Before to start

In JavaScript there is NO concept of Class.

Everything is an Object.

Inheritance between objects is achieved with a mechanism known as Prototypal Inheritance.

We can create Objects and then link them together OLOO (Objects-Linked-to-Other-Objects).

View Kotlin Scope Functions.md
// it's NOT an extension function
// it takes the receiver and a lambda with the same receiver
// it returns the result of the lambda on the implicit receiver
inline fun <T, R> with(receiver: T, block: T.() -> R): R {
    return receiver.block()
}

with ("ciao") {
    length + 1
@xpepper
xpepper / from kotlin source to java execution of the generated bytecode.md
Last active May 25, 2019
from kotlin source to java execution of the generated bytecode
View from kotlin source to java execution of the generated bytecode.md

Write the simplest Kotlin file, and name it Main.kt:

fun main(args: Array<String>) {
    println("Hello world!")
}

Then compile the Kotlin file with kotlinc, which runs the Kotlin compiler

@xpepper
xpepper / Keeping a branch up-to-date with master.md
Last active May 21, 2019
Keeping a branch up-to-date with master
View Keeping a branch up-to-date with master.md

Keeping a branch up-to-date with master and then merge back the branch to master

git checkout new-feature # Go to the feature branch named "new-feature"
git rebase master

# Now your feature have all the commits from master!
@xpepper
xpepper / watching my train delay.md
Last active Apr 28, 2019
watching my train delay :-|
View watching my train delay.md
You can’t perform that action at this time.