Skip to content

Instantly share code, notes, and snippets.

View IlyaOsotov's full-sized avatar
😎

Ilya Osotov IlyaOsotov

😎
  • Aviasales
  • Moscow, Russia
View GitHub Profile
1. Знание основ Ruby, фреймворка Ruby on Rails
- http://guides.rubyonrails.org/
- http://rusrails.ru/
Вопросы:
1. Чем отличается статическая и динамическая типизации в языках программирования?
2. Какие виды наследования поддерживаются в Ruby?
3. Что такое модуль? Какая разница между классом и модулем?
4. Какие есть уровни контроля доступа к методам для классов и модулей?
5. Какие есть способы вызова методов в Ruby?
6. Что означает ключевое слово self?
@yosukehasumi
yosukehasumi / readme.md
Last active October 22, 2021 15:12
DigitalOcean Rails/Ubuntu/NGINX (16.04) Setup

DigitalOcean Rails/Ubuntu/NGINX (16.04) Setup

  1. Setup
  2. Swapfile
  3. NGINX
  4. ElasticSearch
  5. RVM
  6. Rails
  7. Postgres
  8. Capistrano
@ipbastola
ipbastola / clean-up-boot-partition-ubuntu.md
Last active April 3, 2024 06:54
Safest way to clean up boot partition - Ubuntu 14.04LTS-x64, Ubuntu 16.04LTS-x64

Safest way to clean up boot partition - Ubuntu 14.04LTS-x64, Ubuntu 16.04LTS-x64

Reference

Case I: if /boot is not 100% full and apt is working

1. Check the current kernel version

$ uname -r 
@davidderus
davidderus / .dockerignore
Last active March 3, 2024 10:15
Docker + Rails + Puma + Postgres + Nginx
.git
.gitignore
/doc
.yardoc
coverage
jsdoc
/tmp
/log
Dockerfile
Dockerfile.prod
@marcusmalmberg
marcusmalmberg / CarrierWave.md
Last active June 14, 2021 23:22
Guide to setup CarrierWave which will upload a file to Amazon S3 in production environment and use local storage in development and test

CarrierWave home

https://github.com/jnicklas/carrierwave

This example will create an uploader that will upload a file stored in a model Model. The file will be stored locally in development and test environment and will use Amazon S3 in production.

CarrierWave installation

First add the gems.

@jeroenr
jeroenr / Gemfile
Created July 19, 2012 09:34
Make will_paginate generate ajax links
source 'https://rubygems.org'
gem 'rails', '3.2.3'
# Gems used only for assets and not required
# in production environments by default.
group :assets do
gem 'sass-rails', '~> 3.2.3'
gem 'coffee-rails', '~> 3.2.1'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
@justinko
justinko / Plea.markdown
Created May 30, 2012 19:40
Am I doing it wrong?

Dear Rubyists,

I just lost a contract because of my code in a Rails project.

The specific code in question is related to a "posting a comment" feature. Here are the details:

In this project, "posting a comment" does not simply entail inserting a row into the database. It involves a procedure to yes, insert a row, but also detect its language, check for spam, send emails, and "share" it to Twitter and Facebook. I believe this algorithm should be encapsulated. I do not believe it belongs in a controller or a model. I do not believe Active Record callbacks should be used.

The "senior developer", whom is the stake holder's right hand man, said this:

@carlosmcevilly
carlosmcevilly / gist:2221249
Created March 27, 2012 22:55
fix git commit with wrong email address in git config, before pushing
If:
- you add and commit with the wrong email address in git, and
- your remote has a hook set up to prevent you from pushing with the bad address
Then you need to amend the author of your commit before push can succeed:
1. fix your email address in git config:
$ git config user.name "Your Name"