Skip to content

Instantly share code, notes, and snippets.

defmodule Web.Team do
use Web.Web, :model
schema "teams" do
field :name, :string
many_to_many :users, join_through: 'team_members', on_delete: :delete_all
timestamps()
end
@doc """
FROM ubuntu:14.04.3
# Set the locale, otherwise elixir will complain later on
RUN locale-gen en_US.UTF-8
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8
# wget for convenience, use curl if you want to
RUN apt-get -y -q install wget
{
"test_results": {
"aliases": {},
"mappings": {
"cucumber": {
"_timestamp": {
"enabled": true,
"store": true
},
"properties": {
def open3_with_timeout(cmd)
#require 'pry'; binding.pry
inp, out, err, wait_thr = Open3.popen3(cmd)
inp.close
did_timeout = false
still_open = [out, err] # Array that only contains the opened streams
output_buffer = ''
stderr_buffer = ''
# Rails Stuff
alias stoprails='kill -9 $(lsof -i :3000 -t)'
alias startrails='rails server -d'
alias restartrails='stopRails && startRails'
#Check PHP For Erroes
alias phpcheck='find ./ -name \*.php | xargs -n 1 php -l'
# ROT13-encode text. Works for decoding, too! ;)
alias rot13='tr a-zA-Z n-za-mN-ZA-M'