This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
call pathogen#runtime_append_all_bundles() | |
set wildmenu | |
set tabstop=2 | |
set softtabstop=2 | |
set shiftwidth=2 | |
set expandtab | |
set smarttab | |
set autoindent | |
set nu |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module ObjectCreationMethods | |
# def make_user | |
# def make_user! | |
define User do | |
{ | |
username: 'dam5s', | |
email: '[email protected]', | |
password: 's0m3pwd', | |
password_confirmation: 's0m3pwd' | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static String read(InputStream inputStream) { | |
Scanner s = new Scanner(inputStream).useDelimiter("\\A"); | |
return s.hasNext() ? s.next() : ""; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sealed class Maybe<T> { | |
object Nothing: Maybe() | |
data class Some<T>(val value: T): Maybe<T>() | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
task dependenciesGraphDot { | |
mustRunAfter "clean" | |
def graphBuildDir = "build/dependenciesGraph" | |
def dotFile = file "$graphBuildDir/graph.dot" | |
doLast { | |
delete graphBuildDir | |
mkdir graphBuildDir |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sealed class Result<A, E> { | |
fun <B> map(mapping: (A) -> B): Result<B, E> = | |
when (this) { | |
is Success -> Success(mapping(value)) | |
is Failure -> Failure(reason) | |
} | |
fun <B> bind(mapping: (A) -> Result<B, E>): Result<B, E> = | |
when (this) { | |
is Success -> mapping(value) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[<AutoOpen>] | |
module Prelude | |
type AsyncResult<'T, 'TError> = | |
Async<Result<'T, 'TError>> | |
module AsyncResult = | |
let map (mapping : 'T -> 'U) (result : AsyncResult<'T, 'TError>) : AsyncResult<'U, 'TError> = | |
async { | |
match! result with |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
set -v | |
dotnet publish -c release -r linux-x64 | |
warp-packer --arch linux-x64 --input_dir cli-app/bin/Release/netcoreapp2.2/linux-x64/publish --exec cli-app --output cli-app/bin/Release/netcoreapp2.2/cli-app-linux | |
dotnet publish -c release -r osx-x64 | |
warp-packer --arch macos-x64 --input_dir cli-app/bin/Release/netcoreapp2.2/osx-x64/publish --exec cli-app --output cli-app/bin/Release/netcoreapp2.2/cli-app-osx |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.function.Function; | |
interface Result<T, E> { | |
static <T, E> Success<T, E> success(T value) { | |
return new Success<>(value); | |
} | |
static <T, E> Error<T, E> error(E value) { | |
return new Error<>(value); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.example.application | |
import com.example.dateextensions.Date | |
fun main() { | |
println(Date.tomorrow()) | |
} |
OlderNewer