First, install the Sass, Font Awesome, bootstrap(and deps) package:
cd assets
- npm install --save-dev sass-brunch
- npm install --save font-awesome
#!/bin/bash | |
set -e | |
CURRENT_NAME="Zauberantrag" | |
CURRENT_OTP="zauberantrag" | |
NEW_NAME="Wunderantrag" | |
NEW_OTP="wunderantrag" |
defmodule Context do | |
@moduledoc false | |
defmacro __using__(opts) do | |
repo = Keyword.fetch!(opts, :repo) | |
quote do | |
import Context, only: [context: 1, context: 2] | |
Module.put_attribute(__MODULE__, :__repo__, unquote(repo)) |
// app / channel settings | |
var agoraAppId = ""; // Set your Agora App ID | |
var channelName = 'agora-web-docs-demo'; | |
// video profile settings | |
var cameraVideoProfile = '480_4'; // 640 × 480 @ 30fps & 750kbs | |
var screenVideoProfile = '480_2'; // 640 × 480 @ 30fps | |
// create client instances for camera (client) and screen share (screenClient) |
// | |
// Mixins - we need to override the Bootstrap mixins to set border-radius to 0 if $enable-rounded is false. | |
// -------------------------------------------------- | |
@mixin border-radius($radius: $border-radius) { | |
@if $enable-rounded { | |
border-radius: $radius; | |
} | |
@else { |
// | |
// Variables | |
// -------------------------------------------------- | |
// Variables directly translating Bootstrap variables | |
// ------------------------- | |
$s2bs-border-radius-base: $border-radius !default; | |
$s2bs-border-radius-large: $border-radius-lg !default; | |
$s2bs-border-radius-small: $border-radius-sm !default; |
// Import this file after select2 bootstrap theme. Content won't be centered if you don't include this file. | |
.select2-container--bootstrap { | |
.select2-selection--multiple { | |
.select2-selection__choice { | |
margin-top: calc(#{$s2bs-padding-base-vertical} - 1px); | |
} | |
.select2-search--inline .select2-search__field { | |
height: $s2bs-input-height-base; | |
} |
I recently spent some time dealing with nested forms in Phoenix. Nested forms are great when you want to create multiple database records in a single transaction and associate them with each other. I am new to Phoenix and really struggled to find any resources that helped me with my specific problem. I decided to document what I learned in the process in hopes of helping others that are new to Elixir and Phoenix.
Here is my attempt at a one stop shop to learn everything you will need to know about nested forms. If you would like to view the GitHub repo you can check it out here.
Thanks to Heartbeat and Jose for excellent blog posts on nested forms. Also shoutout to Josh for showing me some examples at Ruby
# Sidekiq interaction and startup script | |
commands: | |
create_post_dir: | |
command: "mkdir -p /opt/elasticbeanstalk/hooks/appdeploy/post" | |
ignoreErrors: true | |
files: | |
"/opt/elasticbeanstalk/hooks/appdeploy/post/50_restart_sidekiq.sh": | |
mode: "000755" | |
owner: root | |
group: root |
<script src='https://cdnjs.cloudflare.com/ajax/libs/parsley.js/2.5.0/parsley.min.js'></script> | |
<script> | |
Parsley.options.errorClass = 'has-danger' | |
Parsley.options.successClass = 'has-success' | |
Parsley.options.classHandler = function(f) { return f.$element.closest('.form-group'); } | |
Parsley.options.errorsWrapper = '<div class="form-control-feedback"></div>' | |
Parsley.options.errorTemplate = '<div></div>' | |
</script> |