Skip to content

Instantly share code, notes, and snippets.

💭
Fooling around in elixir…

Evan Travers evantravers

Block or report user

Report or block evantravers

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View evantravers.h
#define LOWER MO(_LOWER)
#define RAISE MO(_RAISE)
View get_links.ex
View gist:fbbe9c7482267b6fc7864f00bdb5dba6
activate application "SystemUIServer"
tell application "System Events"
tell process "SystemUIServer"
set btMenu to (menu bar item 1 of menu bar 1 whose description contains "bluetooth")
tell btMenu
click
tell (menu item "Evan’s AirPods" of menu 1)
click
if exists menu item "Connect" of menu 1 then
click menu item "Connect" of menu 1
View init.vim
" #############################################################################
" Here is my vim configuration with lots of comments to try and explain
" everything that I have done.
" #############################################################################
" Load plug.vim, put all plugins in the right folder
call plug#begin('~/.config/nvim/bundle')
" Language file for elm
Plug 'ElmCast/elm-vim', { 'for': 'elm' }
View .vimrc
set nocompatible
set backspace=indent,eol,start
filetype plugin indent on
set relativenumber
set nowrap
syntax on
color desert
View vimrc
" Load plug
call plug#begin('~/.config/nvim/bundle')
Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': 'yes \| ./install --all' }
Plug 'junegunn/fzf.vim'
Plug 'junegunn/vim-plug'
Plug 'mileszs/ack.vim'
Plug 'tomtom/tcomment_vim'
Plug 'tpope/vim-eunuch'
Plug 'tpope/vim-fugitive'
View gist:a8a695954511034a169d44815efc9b23
# sends a message to a user
# takes an email and user
def send(e, u) do
e.send(u.email)
end
View minimal.init.vim
" Load plug
call plug#begin('~/.config/nvim/bundle')
Plug 'airblade/vim-gitgutter'
Plug 'editorconfig/editorconfig-vim'
Plug 'gregsexton/MatchTag'
Plug 'honza/vim-snippets'
Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': 'yes \| ./install --all' }
Plug 'junegunn/fzf.vim'
Plug 'junegunn/vim-easy-align'
View p3.ex
def sieve(n) when is_integer(n), do: sieve(Enum.to_list(2..n), [1])
def sieve([], result), do: Enum.reverse(result)
def sieve([prime|tail], result) do
tail
|> Enum.reject(& rem(&1, prime) == 0)
|> sieve([prime|result])
end
View .vimrc
set nocompatible
set t_Co=256
"=============================================
" Initialization
"=============================================
" Load plug
call plug#begin('~/.vim/bundle')
You can’t perform that action at this time.