Skip to content

Instantly share code, notes, and snippets.

@fvumbaca
fvumbaca / flutter.vim
Created March 24, 2021 06:07
NeoVim Flutter Hot Reloading
" Flutter wrapper for hot-reloading
" Put this in your plugin directory (Default is $HOME/.config/nvim/plugin)
" Start your Flutter app with :FlutterRun
" all saves to flutter dart files will hot reload
command! FlutterRun :call FlutterStartServer()
command! FlutterStopRun :call FlutterStopRun()
command! FlutterHotReload :call FlutterHotReload()
@fvumbaca
fvumbaca / validator.ex
Last active April 10, 2019 17:23
Simple Map Validator in Elixir
defmodule MyApp.Validator do
@type validator :: :string | :required
@type schema :: %{any() => validator | [validator]}
@spec validate(map(), schema) :: {:ok, any()} | {:validation_error, [String.t()]}
def validate(input, schema) do
schema
|> Enum.reduce([], fn {key, val}, errors ->
input
|> Map.get(key, {__MODULE__, :no_value_found})
@fvumbaca
fvumbaca / .zshrc
Created December 20, 2018 15:29
Zshrc
# Paths
export PATH=$HOME/bin:/usr/local/bin:$PATH
export ZSH="/Users/frankv/.oh-my-zsh"
export SSH_KEY_PATH="~/.ssh/rsa_id"
export GOPATH=$HOME/go
export PATH=$PATH:$GOPATH/bin
# Theme
ZSH_THEME="clean"
@fvumbaca
fvumbaca / AnimationBuilder.swift
Created July 21, 2017 18:30
Swift 3 UIView Animation Composer
//
// AnimationBuilder.swift
// CustomerAssist
//
// Created by Frank Vumbaca on 2017-07-20.
// Copyright © 2017 Redlab. All rights reserved.
//
import Foundation
import UIKit