#Sticky footer with display: flex
Solution inspired by [Philip Walton's sticky footer][1].
This solution is [valid only for][2]:
- Chrome ≥ 21.0
- Firefox ≥ 20.0
- Internet Explorer ≥ 10
- Safari ≥ 6.1
#!/usr/bin/env bash | |
# Purpose: reset docker environment | |
# Argument (optional): all | networks | |
# | |
# "docker-reset" will kill and remove all containers (except dinghy-http-proxy), | |
# dangling images, and volumes. It won't remove networks. | |
# | |
# "docker-reset all" will kill and remove all containers (including | |
# dinghy-http-proxy) and remove all networks, too. |
#!/bin/bash | |
for file in $(git diff --diff-filter=d --cached --name-only | grep -E '\.(js|jsx)$') | |
do | |
git show ":$file" | node_modules/.bin/eslint --stdin --stdin-filename "$file" # we only want to lint the staged changes, not any un-staged changes | |
if [ $? -ne 0 ]; then | |
echo "ESLint failed on staged file '$file'. Please check your code and try again. You can run ESLint manually via npm run eslint." | |
exit 1 # exit with failure status | |
fi | |
done |
require_relative 'task_helpers' | |
desc 'Repeat e2e spec(s) until failure (default :max_number_of_repetitions = 100)' | |
task :repeat, [:max_number_of_repetitions] do |_t, args| | |
maximum_repetitions = args[:max_number_of_repetitions] ? args[:max_number_of_repetitions].to_i : 100 | |
test_run = 'docker-compose run --rm testrunner bundle exec rspec spec' | |
Console.log_info "\n Executing #{maximum_repetitions} times (or until failure):" | |
Console.log_info "\n\t '#{test_run}'" |
def suppress_output(out: true, err: false) | |
null = open(File::NULL, "w") | |
old_out = $stdout.dup | |
old_err = $stderr.dup | |
$stdout.reopen(null) if out | |
$stderr.reopen(null) if err | |
yield | |
ensure | |
$stdout.reopen(old_out) | |
$stderr.reopen(old_err) |
heroku pg:reset DATABASE_URL --app <APP> | |
heroku run bin/rails db:migrate --app <APP> | |
heroku run bin/rails db:seed --app <APP> | |
heroku restart --app <APP> |
require 'spec/factories/course_factory' | |
require 'spec/factories/user_factory' | |
include Factories | |
# Create, register, and enroll teacher | |
course_with_teacher( | |
active_course: 1, | |
active_enrollment: 1, | |
course_name: 'E2E Course', |
# Purpose: reset docker environment | |
# Argument (optional): all | |
# | |
# "docker-reset" will kill and remove all containers (except dinghy-http-proxy), | |
# dangling images, and volumes. It won't remove networks. | |
# | |
# "docker-reset all" will do everything in 'docker-reset' and remove all | |
# networks, too. | |
# |
= form_for @user do |f| | |
.row | |
.small-12.columns | |
.field | |
= f.text_field :name | |
.field | |
= f.text_field :company | |
.field | |
= f.text_field :email | |
.field |
Array.new(n) { [*'0'..'9'].sample }.join | |
# example use case: generate a random USA phone number (no parantheses or hyphens), e.g. 9875551234 | |
Array.new(10) { [*'0'..'9'].sample }.join |