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
type state = {count: int}; | |
type action = | |
| Increment | |
| Decrement; | |
let component = ReasonReact.reducerComponent("State"); | |
let make = _children => { | |
...component, |
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
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
import burlap.behavior.singleagent.Policy; | |
import burlap.behavior.singleagent.planning.ActionTransitions; | |
import burlap.behavior.singleagent.planning.HashedTransitionProbability; | |
import burlap.behavior.singleagent.planning.PlannerDerivedPolicy; | |
import burlap.behavior.singleagent.planning.ValueFunctionPlanner; | |
import burlap.behavior.singleagent.planning.commonpolicies.GreedyDeterministicQPolicy; | |
import burlap.behavior.statehashing.DiscreteStateHashFactory; | |
import burlap.behavior.statehashing.StateHashTuple; | |
import burlap.domain.singleagent.graphdefined.GraphDefinedDomain; | |
import burlap.oomdp.core.Domain; |
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
# views_loader.ex | |
defmacro compile_views(root) do | |
root = Code.eval_quoted(root, [], file: __ENV__.file, line: __ENV__.line) |> elem(0) | |
views = Enum.filter(get_all_files(:erlang.binary_to_list(root) ++ '/lib/views/'), fn(f) -> :filename.extension(f) == '.html' end) | |
lc view inlist views do | |
content = add_helpers_imports(File.read!(view)) | |
quote do | |
defmodule unquote(Weber.Utils.build_module_name(view)) do | |
require EEx |
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
let vundle_readme=expand('~/.vim/bundle/vundle/README.md') | |
if !filereadable(vundle_readme) | |
silent !mkdir -p ~/.vim/bundle | |
silent !git clone https://github.com/gmarik/vundle ~/.vim/bundle/vundle | |
endif |
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 System.Environment | |
import Data.List | |
main :: IO() | |
main = fmap factorialize getArgs >>= putStrLn | |
factorialize :: [String] -> String | |
factorialize = toStr . factorials . toIntegers | |
toIntegers :: [String] -> [Integer] |
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
#!/usr/bin/env elixir | |
IO.puts "Hello from a script" |
NewerOlder