I no personal preference/order
vim-elixir: Vim configuration files for Elixir
Janus: This is a distribution of plug-ins and mappings for Vim, Gvim and MacVim.
# Actual Elixir module with all the functions | |
defmodule LibDemo do | |
def hello(), do: IO.puts "Hello, World!" | |
def hello(name), do: IO.puts "Hello, #{name}!" | |
end | |
defmodule LibDemo.Utils do | |
def make_args(0), do: [] | |
def make_args(n) do | |
Enum.map(1..n, fn n -> {String.to_atom("arg#{n}"), [], Elixir} end) |
# MYAPP/.deliver/config | |
APP="<APP NAME>" | |
MAIN_HOST="<BUILD & PRODUCTION HOST>" | |
MAIN_USER="<MAIN USER FOR BUILD AND DEPLOY>" | |
BUILD_HOST="${MAIN_HOST}" | |
BUILD_USER="${MAIN_USER}" | |
BUILD_AT="/tmp/edeliver/${APP}/builds" |
/* Flatten das boostrap */ | |
.well, .navbar-inner, .popover, .btn, .tooltip, input, select, textarea, pre, .progress, .modal, .add-on, .alert, .table-bordered, .nav>.active>a, .dropdown-menu, .tooltip-inner, .badge, .label, .img-polaroid { | |
-moz-box-shadow: none !important; | |
-webkit-box-shadow: none !important; | |
box-shadow: none !important; | |
-webkit-border-radius: 0px !important; | |
-moz-border-radius: 0px !important; | |
border-radius: 0px !important; | |
border-collapse: collapse !important; | |
background-image: none !important; |
I no personal preference/order
vim-elixir: Vim configuration files for Elixir
Janus: This is a distribution of plug-ins and mappings for Vim, Gvim and MacVim.
# load into test setup after `require 'capybara/rails'` | |
# some sources for below flags and profile settings | |
# https://stackoverflow.com/questions/43143014/chrome-is-being-controlled-by-automated-test-software/43145088 | |
# https://sqa.stackexchange.com/questions/26051/chrome-driver-2-28-chrome-is-being-controlled-by-automated-test-software-notif | |
# http://stackoverflow.com/questions/12211781/how-to-maximize-window-in-chrome-using-webdriver-python | |
# update sources for new Options object | |
# https://github.com/SeleniumHQ/selenium/wiki/Ruby-Bindings | |
# https://github.com/teamcapybara/capybara/blob/master/lib/capybara/selenium/driver.rb | |
begin |
require "active_support" | |
require "active_support/core_ext/string/output_safety" | |
require "objspace" | |
def assert_same_object(x, y) | |
raise unless x.object_id == y.object_id | |
end | |
def assert_not_same_object(x, y) | |
raise unless x.object_id != y.object_id |
If you have your code defined in classes in lib/ folder you may have problems to load that code in production.
Autoloading is disabled in the production environment by default because of thread safety.
Change config/application.rb:
config.autoload_paths << Rails.root.join("lib")
config.eager_load_paths << Rails.root.join("lib")
After automatically updating Postgres to 10.0 via Homebrew, the pg_ctl start command didn't work. | |
The error was "The data directory was initialized by PostgreSQL version 9.6, which is not compatible with this version 10.0." | |
Database files have to be updated before starting the server, here are the steps that had to be followed: | |
# need to have both 9.6.x and latest 10.0 installed, and keep 10.0 as default | |
brew unlink postgresql | |
brew install postgresql@9.6 | |
brew unlink postgresql@9.6 | |
brew link postgresql |
Rank | Type | Prefix/Suffix | Length | |
---|---|---|---|---|
1 | Prefix | my+ | 2 | |
2 | Suffix | +online | 6 | |
3 | Prefix | the+ | 3 | |
4 | Suffix | +web | 3 | |
5 | Suffix | +media | 5 | |
6 | Prefix | web+ | 3 | |
7 | Suffix | +world | 5 | |
8 | Suffix | +net | 3 | |
9 | Prefix | go+ | 2 |
http://stackoverflow.com/questions/22667401/postgres-json-data-type-rails-query | |
http://stackoverflow.com/questions/40702813/query-on-postgres-json-array-field-in-rails | |
#payload: [{"kind"=>"person"}] | |
Segment.where("payload @> ?", [{kind: "person"}].to_json) | |
#data: {"interest"=>["music", "movies", "programming"]} | |
Segment.where("data @> ?", {"interest": ["music", "movies", "programming"]}.to_json) | |
Segment.where("data #>> '{interest, 1}' = 'movies' ") | |
Segment.where("jsonb_array_length(data->'interest') > 1") |