Skip to content

Instantly share code, notes, and snippets.

@carolosf
carolosf / build.gradle.kts
Last active November 20, 2017 18:21
Example gradle build file using kotlin dsl
// 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" }

Keybase proof

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:

@carolosf
carolosf / ExplodeNestedArrayPhp
Last active April 12, 2023 09:06
Explode To Nested Array - Converts a string with a delimiter into a nested associative array and assigns the value to the final key
<?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
*
@carolosf
carolosf / gitaliases.sh
Last active March 9, 2016 16:08
aliases for git
#!/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'