I hereby claim:
- I am carolosf on github.
- I am carolosf (https://keybase.io/carolosf) on keybase.
- I have a public key whose fingerprint is ECA5 5E77 8B17 5457 4404 83DE C4BC 249A 4B99 BADA
To claim this, I am signing this object:
| #!/bin/bash | |
| # from https://git-scm.com/book/en/v2/Git-Basics-Git-Aliases | |
| git config --global alias.co checkout | |
| git config --global alias.br branch | |
| git config --global alias.ci commit | |
| git config --global alias.st status | |
| git config --global alias.unstage 'reset HEAD --' | |
| git config --global alias.last 'log -1 HEAD' |
| <?php | |
| /** | |
| * Converts a string with a delimiter into a nested associative array and assigns the value to the final key | |
| * by Carolos Foscolos - I call this little algorithm bubble wrap - because it's like wrapping bubbles around each other | |
| * explodeToNestedArray('.', 'abc.def', 'XYZ') becomes ['abc' => ['def' => 'XYZ']] | |
| * | |
| * @param string $delimiter | |
| * @param string $key | |
| * @param $value | |
| * |
I hereby claim:
To claim this, I am signing this object:
| // Gradle version 4.3.1 and kotlin dsl 0.12.3 | |
| // Kotlin 1.1.60 | |
| import org.jetbrains.kotlin.gradle.tasks.KotlinCompile | |
| import org.jetbrains.kotlin.gradle.dsl.Coroutines | |
| group = "com.example" | |
| version = "1.0-SNAPSHOT" | |
| buildscript { | |
| val kotlinVersion: String by extra { "1.1.60" } |
| #!/bin/bash | |
| # Nice mappings for FL Studio 12 and my M-Audio Axiom air 32 mini | |
| # aseqdump -l | |
| # aseqdump -p "Axiom A.I.R. Mini32" | |
| # sudo apt install xdotool | |
| aseqdump -p "Axiom A.I.R. Mini32" | \ | |
| while IFS=" ," read src ev1 ev2 ch label1 data1 label2 data2 rest; do | |
| #echo "$srsc $ev1 $ev2 $ch $label1 $data1 $label2 $data2 $rest" | |
| case "$ev1 $ev2 $data1 $data2" in | |
| "Control change 17 127" ) xdotool key space ;; |
| import org.springframework.jdbc.core.JdbcTemplate; | |
| import java.util.List; | |
| public class CreateMonsterRepositorySql implements CreateMonsterRepository { | |
| private final JdbcTemplate jdbcTemplate; | |
| public CreateMonsterRepositorySql(JdbcTemplate jdbcTemplate) { | |
| this.jdbcTemplate = jdbcTemplate; |
#Replace directories with : with - https://askubuntu.com/questions/227410/replace-all-colons-from-filenames-with-terminal For directories: find . -type d -readable -writable -exec rename 's|:|-|g' {} ; And then files: find . -type f -readable -writable -exec rename 's|:|-|g' {} ; – user8290
| buildscript { | |
| ext.kotlin_version = '1.2.31' | |
| repositories { | |
| mavenCentral() | |
| } | |
| dependencies { | |
| classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" | |
| } | |
| } |
| data class User(val id: String, val email: String, val title: String) | |
| val sortedById = {u : User -> u.id} | |
| val sortedByEmail = {u : User -> u.email} | |
| val sortOrder = listOf("id", "email") | |
| val transformedSortOrderListToComparable = sortOrder.map { | |
| when (it) { | |
| "id" -> sortedById //Can inline |
| group 'com.example' | |
| version '1.0-SNAPSHOT' | |
| buildscript { | |
| ext.kotlin_version = '1.3.0' | |
| repositories { | |
| mavenCentral() | |
| } | |
| dependencies { | |
| classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" |