Skip to content

Instantly share code, notes, and snippets.


Danilo Araújo Silva Danilo-Araujo-Silva

View GitHub Profile
#echo $@
# store arguments in a special array
# get number of elements
Danilo-Araujo-Silva / mathemagika.kts
Last active Jun 17, 2020
Mathemagika Demonstration Kotlin KTS Script
View mathemagika.kts
@file:MavenRepository("mathemagika", "" )
Danilo-Araujo-Silva / kotlin_keywords_and_symbols.kt
Created Jun 10, 2020
All Kotlin Keyworkds and Symbols in a MutableMap
View kotlin_keywords_and_symbols.kt
val kotlinKeywordsAndSymbols =
View FunctionLambdaCompositionInKotlin.kt
infix fun <A, B, C> ((A) -> B).andThen(g: (B) -> C): (A) -> C = { a: A -> g(this(a)) }
val c = a andThen b
Danilo-Araujo-Silva / Allowed characters in Kotlin
Last active Jul 28, 2020
Allowed characters in Kotlin backticks
View Allowed characters in Kotlin

Allowed characters in Kotlin backticks

Some allowed characters are

val ` -!"#$%^&()*+,-=?@^_{|}~😡` = ""

Yes, that's write, emojis are allowed too =)

Some not allowed characters are

We couldn’t find that file to show.
Danilo-Araujo-Silva / Vee Validate - Validating Child components
Last active Nov 13, 2020
A strategy to validate child components with Vue and Vee Validate.
View Vee Validate - Validating Child components
// Somewhere in the initialization:
import VeeValidate from "vee-validate";
// Then, in the parent component:
export default {
provide () {
return { parentValidator: this.$validator }
Danilo-Araujo-Silva / install_octave_with_gui_and_gnuplot_on_macos_mojave.txt
Last active Jul 5, 2019
Install Octave with gui and gnuplot on macOS Mojave
View install_octave_with_gui_and_gnuplot_on_macos_mojave.txt
# Install homebrew, if is not already installed:
/usr/bin/ruby -e "$(curl -fsSL"
# Update and upgrade homebrew, if needed:
brew update && brew upgrade
# Install XCode (it is a long download, it is an Octave dependency)
# Go to Apple Store and install.
# Install Aquaterm
Danilo-Araujo-Silva / Extension.kt
Created Oct 31, 2018
Kotlin: get a list of some property values from a collection / list of objects
View Extension.kt
import kotlin.reflect.KMutableProperty1
inline fun <reified T, Y> MutableList<T>.arrayListOfField(property: KMutableProperty1<T, Y?>): ArrayList<Y> {
val output = ArrayList<Y>()
this.forEach {t: T ->
output.add(property.get(t) as Y)
Danilo-Araujo-Silva / solution
Created Oct 30, 2018
Solution: xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
View solution
To fix the error:
`xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun`
You can do:
`xcode-select --install`
More info on: