MARK P. JONES
Pacific Software Research Center
Department of Computer Science and Engineering
Oregon Graduate Institute of Science and Technology
set nocompatible " Disable vi-compatibility | |
set t_Co=256 | |
colorscheme xoria256 | |
set guifont=menlo\ for\ powerline:h16 | |
set guioptions-=T " Removes top toolbar | |
set guioptions-=r " Removes right hand scroll bar | |
set go-=L " Removes left hand scroll bar | |
set linespace=15 |
################################################################# | |
# = This script transfers bash history to zsh history | |
# = Change bash and zsh history files, if you don't use defaults | |
# | |
# = Usage: ruby bash_to_zsh_history.rb | |
# | |
# = Author: Ankit Goyal | |
################################################################# | |
# change if you don't use default values |
Author: Nilo Dantas - n1lo | |
Based on: https://bugs.launchpad.net/ubuntu/+source/ibus/+bug/518056 - helio-valente post | |
How to use Cedilha on US Keyboard on ArchLinux | |
1) Put: English(US, internacional with dead Keys) on your system keyboard layout. | |
2) Editing the files: | |
sudo vim /usr/lib/gtk-3.0/3.0.0/immodules.cache |
// the main app file | |
import express from "express"; | |
import loadDb from "./loadDb"; // dummy middleware to load db (sets request.db) | |
import authenticate from "./authentication"; // middleware for doing authentication | |
import permit from "./authorization"; // middleware for checking if user's role is permitted to make request | |
const app = express(), | |
api = express.Router(); | |
// first middleware will setup db connection |
This guide was written because I don't particularly enjoy deploying Phoenix (or Elixir for that matter) applications. It's not easy. Primarily, I don't have a lot of money to spend on a nice, fancy VPS so compiling my Phoenix apps on my VPS often isn't an option. For that, we have Distillery releases. However, that requires me to either have a separate server for staging to use as a build server, or to keep a particular version of Erlang installed on my VPS, neither of which sound like great options to me and they all have the possibilities of version mismatches with ERTS. In addition to all this, theres a whole lot of configuration which needs to be done to setup a Phoenix app for deployment, and it's hard to remember.
For that reason, I wanted to use Docker so that all of my deployments would be automated and reproducable. In addition, Docker would allow me to have reproducable builds for my releases. I could build my releases on any machine that I wanted in a contai
#!/usr/bin/env bash | |
set -e | |
# https://docs.docker.com/engine/install/ubuntu/ | |
sudo apt-get -y install apt-transport-https ca-certificates curl software-properties-common | |
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - 2>/dev/null | |
sudo echo "deb [arch=amd64] https://download.docker.com/linux/$(lsb_release -is | tr '[:upper:]' '[:lower:]') bionic stable" > /etc/apt/sources.list.d/docker.list | |
sudo apt-get -y update |
" Must come first because it changes other options | |
set nocompatible | |
" [vim-plug] Load plugins | |
call plug#begin() | |
Plug 'dracula/vim', { 'as': 'dracula' } | |
Plug 'junegunn/vim-easy-align' | |
Plug 'pangloss/vim-javascript' | |
Plug 'mxw/vim-jsx' | |
Plug 'tpope/vim-bundler' |
[alias] | |
ci = commit | |
co = checkout | |
cm = checkout master | |
cb = checkout -b | |
st = status -sb | |
sf = show --name-only | |
lg = log --pretty=format:'%Cred%h%Creset %C(bold)%cr%Creset %Cgreen<%an>%Creset %s' --max-count=30 | |
incoming = !(git fetch --quiet && git log --pretty=format:'%C(yellow)%h %C(white)- %C(red)%an %C(white)- %C(cyan)%d%Creset %s %C(white)- %ar%Creset' ..@{u}) | |
outgoing = !(git fetch --quiet && git log --pretty=format:'%C(yellow)%h %C(white)- %C(red)%an %C(white)- %C(cyan)%d%Creset %s %C(white)- %ar%Creset' @{u}..) |
type name = string | |
module AST = struct | |
type ty = | |
| TFun of ty * ty | |
| TNamed of string | |
| TApp of ty * ty | |
type exp = | |
| Annot of exp * ty |