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
/* | |
* GitHub Dark v2.6.0 | |
* Copyright 2016 Quan You. | |
* GitHub Project (https://cquanu.github.io/github-dark/) | |
* Licensed under MIT (https://github.com/cquanu/github-dark/blob/master/LICENSE) | |
*/ | |
/* HTML Global */ |
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 Hello.Mixfile do | |
use Mix.Project | |
def project do | |
[ | |
app: :hello, | |
version: "0.0.1", | |
elixir: "~> 1.4", | |
elixirc_paths: elixirc_paths(Mix.env), | |
compilers: [:phoenix, :gettext] ++ Mix.compilers, |
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
version: '2' | |
services: | |
# Application database | |
db: | |
image: postgres | |
ports: | |
- "5432:5432" | |
volumes: | |
- ./db:/var/lib/postgresql |
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
module FillInWysihtml5Helpers | |
def fill_in_wysihtml5(label, options = {}) | |
page.execute_script <<-JAVASCRIPT | |
var id = $("label:contains(#{label})").attr("for"); | |
$("#" + id).data("wysihtml5").editor.setValue("#{options[:with]}"); | |
JAVASCRIPT | |
end | |
def read_wysihtml5(label) | |
page.execute_script <<-JAVASCRIPT |
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
docker exec legalannouncements_database_1 psql --username=appuser --dbname=my_awesome_development psql -c 'ALTER TABLE institutions ADD PRIMARY KEY (id)' |
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
docker exec legalannouncements_database_1 pg_restore -U appuser --dbname my_awesome_development --table=institutions /db_dump/20160815_backup.sql |
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
docker exec legalannouncements_database_1 psql -U appuser --dbname my_awesome_development -c "DROP TABLE institutions" |
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
lb: | |
image: 'dockercloud/haproxy:latest' | |
links: | |
- sento-io | |
ports: | |
- '80:80' | |
roles: | |
- global | |
sento-io: | |
environment: |
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
class Right | |
… | |
has_many :right_levels | |
deprecate :levels, :right_levels | |
… | |
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
class Module | |
def deprecate(old_method, new_method) | |
define_method(old_method) do |*args, &block| | |
warn "DEPRECATION WARNING: #{old_method} is deprecated in favour of #{new_method}. (called from #{caller.first})" | |
send(new_method, *args, &block) | |
end | |
end | |
end |