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
defmodule Fizzbuzz do | |
def parse(range \\ 1..100) do | |
range | |
|> Enum.map(&parse_num/1) | |
|> Enum.join | |
end | |
defp parse_num(n) do | |
fizzbuzzer(n, rem(n, 3), rem(n, 5)) | |
end |
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
if !filereadable(glob("~/.config/nvim/autoload/plug.vim")) | |
!curl -fLo ~/.config/nvim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim | |
endif | |
let g:python_host_prog = $HOME . '/.pyenv/versions/neovim2/bin/python' | |
let g:python3_host_prog = $HOME . '/.pyenv/versions/neovim3/bin/python' | |
let mapleader = ' ' | |
silent !mkdir -p ~/.vim/undo > /dev/null 2>&1 |
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
if !filereadable(glob("~/.config/nvim/autoload/plug.vim")) | |
!curl -fLo ~/.config/nvim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim | |
endif | |
let g:clipboard = { | |
\ 'name': 'pbcopy', | |
\ 'copy': { | |
\ '+': 'pbcopy', | |
\ '*': 'pbcopy', | |
\ }, |
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
# Theme based on Bira theme from oh-my-zsh: https://github.com/robbyrussell/oh-my-zsh/blob/master/themes/bira.zsh-theme | |
# Some code stolen from oh-my-fish clearance theme: https://github.com/bpinto/oh-my-fish/blob/master/themes/clearance/ | |
function __user_host | |
set -l content | |
if [ (id -u) = "0" ]; | |
echo -n (set_color --bold red) | |
else | |
echo -n (set_color --bold green) | |
end |
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
type state = {count: int}; | |
type action = | |
| Increment | |
| Decrement; | |
let component = ReasonReact.reducerComponent("State"); | |
let make = _children => { | |
...component, |
OlderNewer