http://g3ortega.com/rails/2017/05/30/rails-5-1-and-forward-yarn-on-rails.html
https://evilmartians.com/chronicles/evil-front-part-1
RVM install Ruby 2.5.1
$ rvm install 2.5.1
#!/bin/bash | |
# Set up CPAN, cpanm, youtube-viewer, po4a[x], stow | |
# Append the following lines to .bashrc / .profile | |
# PERL_DIR=$HOME/.perl | |
# export PERL_LOCAL_LIB_ROOT=$PERL_DIR:${PERL_LOCAL_LIB_ROOT} | |
# export PATH=$PERL_DIR/bin:$PATH | |
# export PERL5LIB=$PERL_DIR/lib/perl5 | |
# PERL_MB_OPT="--install_base \"${PERL_DIR}\""; export PERL_MB_OPT; | |
# PERL_MM_OPT="INSTALL_BASE=${PERL_DIR}"; export PERL_MM_OPT; |
#!/usr/bin/env bash | |
# Docker compose wrapper with submodule support | |
# Reads all docker-compose.yaml files given with -f / --files and compiles one | |
# big docker-compose.yaml file before running docker-compose. | |
# | |
# This is useful when you have nested docker-compose subprojects in different | |
# folders which contain relative paths. | |
# see: https://github.com/docker/compose/issues/3874 | |
# | |
# Environment: |
http://g3ortega.com/rails/2017/05/30/rails-5-1-and-forward-yarn-on-rails.html
https://evilmartians.com/chronicles/evil-front-part-1
RVM install Ruby 2.5.1
$ rvm install 2.5.1
Единственная запара возникла при подключении иконок к рельс6, решается так (app/javascript/packs/fa.scss)
@import "bulma/bulma";
$fa-font-path: '~@fortawesome/fontawesome-free/webfonts';
@import '~@fortawesome/fontawesome-free/scss/fontawesome';
@import '~@fortawesome/fontawesome-free/scss/solid'; // fas prefix
@import '~@fortawesome/fontawesome-free/scss/brands'; // fab prefix
// see https://fontawesome.com/how-to-use/with-the-api/setup/importing-icons for more prefixes
@steps_path = ENV['STEPS_PATH'] | |
@features_path = ENV['FEATURES_PATH'] | |
@steps_array = [] | |
@unused_steps = [] | |
def steps_files(path) | |
Dir[path + '**/*.rb'] | |
end | |
def features_files(path) |
=Navigating= | |
visit('/projects') | |
visit(post_comments_path(post)) | |
=Clicking links and buttons= | |
click_link('id-of-link') | |
click_link('Link Text') | |
click_button('Save') | |
click('Link Text') # Click either a link or a button | |
click('Button Value') |
Originally published in June 2008
When hiring Ruby on Rails programmers, knowing the right questions to ask during an interview was a real challenge for me at first. In 30 minutes or less, it's difficult to get a solid read on a candidate's skill set without looking at code they've previously written. And in the corporate/enterprise world, I often don't have access to their previous work.
To ensure we hired competent ruby developers at my last job, I created a list of 15 ruby questions -- a ruby measuring stick if you will -- to select the cream of the crop that walked through our doors.
Candidates will typically give you a range of responses based on their experience and personality. So it's up to you to decide the correctness of their answer.
### Nginx ### | |
check process nginx with pidfile /opt/nginx/logs/nginx.pid | |
start program = "/etc/init.d/nginx start" | |
stop program = "/etc/init.d/nginx stop" | |
if cpu > 60% for 2 cycles then alert | |
if cpu > 80% for 5 cycles then restart | |
if memory usage > 80% for 5 cycles then restart | |
if failed host 127.0.0.1 port 80 protocol http | |
then restart | |
if 3 restarts within 5 cycles then timeout |
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 [email protected] | |
brew unlink [email protected] | |
brew link postgresql |