Skip to content

Instantly share code, notes, and snippets.

View rahimsiz's full-sized avatar

Ramil Badretdinov rahimsiz

View GitHub Profile
@rahimsiz
rahimsiz / sphinx.rb
Last active August 29, 2015 14:26 — forked from pcorliss/sphinx.rb
require 'formula'
class Sphinx < Formula
url 'https://s3-eu-west-1.amazonaws.com/rnaveiras-software/sphinx-0.9.9.tar.gz'
homepage 'http://www.sphinxsearch.com'
sha1 '8c739b96d756a50972c27c7004488b55d7458015'
depends_on 'homebrew/dupes/apple-gcc42'
resource 'stemmer' do
Ruby
принципиальное различие скриптовых и “обычных” языков
3 принципа ООП
реализация множественного наследования в ruby
duck typing
многопоточность в ruby
Rails
что такое MVC и зачем это нужно
локига в контроллере, должна ли быть и почему
синхронные и асинхронные операции — предложить варианты решения
# Support for Rspec / Capybara subdomain integration testing
# Make sure this file is required by spec_helper.rb
#
# Sample subdomain test:
# it "should test subdomain" do
# switch_to_subdomain("mysubdomain")
# visit root_path
# end
DEFAULT_HOST = "lvh.me"
@rahimsiz
rahimsiz / deploy.rb
Created July 26, 2012 09:35 — forked from mikhailov/deploy.rb
capistrano prettify
# standard capistrano config goes here....
# Prettify output to console
logger.level = Capistrano::Logger::IMPORTANT
STDOUT.sync
before "deploy:web:disable" do print "\e[34m-->\e[0m Put maintenance screen......."; end
after "deploy:web:disable" do puts "[\e[32m✓\e[0m]"; end
@rahimsiz
rahimsiz / gist:3157093
Created July 21, 2012 20:41 — forked from kkdeploy/gist:2950619
Capistrano fast assets precompile
namespace :assets do
task :precompile, :roles => :web, :except => { :no_release => true } do
if capture("diff -r #{latest_release}/app/assets/ #{current_release}/app/assets/ | wc -l").to_i > 0
run %Q{cd #{current_release} && #{rake} RAILS_ENV=#{rails_env} #{asset_env} assets:precompile}
else
logger.info "Skipping asset pre-compilation because there were no asset changes"
end
end
end
@rahimsiz
rahimsiz / ffmpeg.rb
Created January 2, 2012 21:28 — forked from Flamefork/ffmpeg.rb
ffmpeg & carrierwave
module CarrierWave
module FFMPEG
extend ActiveSupport::Concern
module ClassMethods
def faststart
process :faststart => true
end
def transcode options