$ sudo install -o redis -g redis -d /var/lib/redis2
$ sudo cp -p /etc/redis/redis.conf /etc/redis/redis2.conf
[server] | |
SERVER | |
[server:vars] | |
server_name=SERVER | |
[email protected] | |
docker_nginx_ssl=true |
#!/usr/bin/env bash | |
# This script installs PhantomJS on your Debian/Ubuntu System | |
# | |
# Taken from https://gist.github.com/julionc/7476620#gistcomment-2030572 and changed the download directory | |
# | |
# This script must be run as root: | |
# sudo sh install_phantomjs.sh | |
if [[ $EUID -ne 0 ]]; then | |
echo "This script must be run as root" 1>&2 |
#!/usr/bin/python3 | |
""" | |
Copyright 2021 Mygod | |
Licensed under the Apache License, Version 2.0 (the "License"); | |
you may not use this file except in compliance with the License. | |
You may obtain a copy of the License at | |
http://www.apache.org/licenses/LICENSE-2.0 |
1. Знание основ Ruby, фреймворка Ruby on Rails | |
- http://guides.rubyonrails.org/ | |
- http://rusrails.ru/ | |
Вопросы: | |
1. Чем отличается статическая и динамическая типизации в языках программирования? | |
2. Какие виды наследования поддерживаются в Ruby? | |
3. Что такое модуль? Какая разница между классом и модулем? | |
4. Какие есть уровни контроля доступа к методам для классов и модулей? | |
5. Какие есть способы вызова методов в Ruby? | |
6. Что означает ключевое слово self? |
It's important to note that running this reset will drop any existing data you have in the application
heroku restart
heroku pg:reset DATABASE
(no need to change the DATABASE
)heroku run rake db:migrate
heroku run rake db:seed
(if you have seed)One liner
# Backup | |
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql | |
# Restore | |
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE | |
#!/usr/bin/env bash | |
# | |
# Originally from https://gist.github.com/IanVaughan/2902499 | |
# | |
# authors: Ian Vaughan | |
# Jacob Zimmerman | |
# | |
# usage: uninstall_gems [<version> ...] | |
# | |
# examples: |
#!/bin/bash | |
### USAGE | |
### | |
### ./ElasticSearch.sh 1.7 will install Elasticsearch 1.7 | |
### ./ElasticSearch.sh will fail because no version was specified (exit code 1) | |
### | |
### CLI options Contributed by @janpieper | |
### Check http://www.elasticsearch.org/download/ for latest version of ElasticSearch |
# Support for Rspec / Capybara subdomain integration testing | |
# Make sure this file is required by spec_helper.rb | |
# (e.g. save as spec/support/subdomains.rb) | |
def switch_to_subdomain(subdomain) | |
# lvh.me always resolves to 127.0.0.1 | |
hostname = subdomain ? "#{subdomain}.lvh.me" : "lvh.me" | |
Capybara.app_host = "http://#{hostname}" | |
end |