Skip to content

Instantly share code, notes, and snippets.

View Danilo-Araujo-Silva's full-sized avatar

Danilo Araújo Silva Danilo-Araujo-Silva

View GitHub Profile

For example, to override the AppBar (https://material-ui-next.com/api/app-bar/) root class we can do the following:

First method (override Material UI classnames):

1 - Add the property classes in the AppBar component:

    <AppBar classes={{root: 'my-root-class'}}
@Danilo-Araujo-Silva
Danilo-Araujo-Silva / solution
Created October 30, 2018 11:23
Solution: xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
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:
`https://apple.stackexchange.com/questions/254380/macos-mojave-invalid-active-developer-path`
@Danilo-Araujo-Silva
Danilo-Araujo-Silva / Extension.kt
Created October 31, 2018 14:43
Kotlin: get a list of some property values from a collection / list of objects
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 ->
@Suppress("UNCHECKED_CAST")
output.add(property.get(t) as Y)
}
@Danilo-Araujo-Silva
Danilo-Araujo-Silva / install_octave_with_gui_and_gnuplot_on_macos_mojave.txt
Last active July 5, 2019 14:57
Install Octave with gui and gnuplot on macOS Mojave
# Install homebrew, if is not already installed:
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
# 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
Danilo-Araujo-Silva / Vee Validate - Validating Child components
Last active March 25, 2023 10:13
A strategy to validate child components with Vue and Vee Validate.
// Somewhere in the initialization:
import VeeValidate from "vee-validate";
Vue.use(VeeValidate);
// Then, in the parent component:
export default {
provide () {
return { parentValidator: this.$validator }
},
We couldn’t find that file to show.
@Danilo-Araujo-Silva
Danilo-Araujo-Silva / Allowed characters in Kotlin backticks.md
Last active February 16, 2024 16:13
Allowed characters in Kotlin backticks

Allowed characters in Kotlin backticks

Some allowed characters are

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

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

Some not allowed characters are

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
Danilo-Araujo-Silva / kotlin_keywords_and_symbols.kt
Created June 10, 2020 16:31
All Kotlin Keyworkds and Symbols in a MutableMap
val kotlinKeywordsAndSymbols =
mutableListOf(
"as",
"as?",
"break",
"class",
"continue",
"do",
"else",
"false",
@Danilo-Araujo-Silva
Danilo-Araujo-Silva / mathemagika.kts
Last active June 17, 2020 16:52
Mathemagika Demonstration Kotlin KTS Script
@file:MavenRepository("mathemagika", "https://dl.bintray.com/danilo-araujo-silva/mathemagika" )
@file:DependsOnMaven("com.daniloaraujosilva:mathemagika:1.0.0")
println(zeta(2))