This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Capistrano configuration | |
# | |
# require 'new_relic/recipes' - Newrelic notification about deployment | |
# require 'capistrano/ext/multistage' - We use 2 deployment environment: staging and production. | |
# set :deploy_via, :remote_cache - fetch only latest changes during deployment | |
# set :normalize_asset_timestamps - no need to touch (date modification) every assets | |
# "deploy:web:disable" - traditional maintenance page (during DB migrations deployment) | |
# task :restart - Unicorn with preload_app should be reloaded by USR2+QUIT signals, not HUP | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def ApplicationController | |
def blah | |
@meme.drop! | |
end | |
end | |
class FooController < ApplicationController |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/local/bin/ruby | |
module DocSorter | |
extend self | |
require 'ap' | |
DOC = %w{doc docx xls odt xlsx dwg txt cdr psd ppt eml csv log xslic} | |
CODE = %w{yml sql mht htm html php rb diff conf} | |
PDF = %w{pdf} | |
GRAPH = %w{tiff jpg jpeg bmp gif png} | |
ARH = %w{zip rar 7z gz tgz bz2 bz exe jnlp msi apk xpi gem ipsw} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/local/bin/ruby | |
require 'ap' | |
DOCS = %w{doc docx odt xls} | |
SCANS = %w{pdf tiff jpg jpeg bmp} | |
ARCHS = %w{zip rar 7z gz tgz bz2 bz} | |
MUZ = %w{mp3 wav flac} | |
dowsdir = '/home/achernikov/Downloads' | |
docs = [] | |
archs = [] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
user app; | |
worker_processes 2; | |
error_log /home/app/logs/nginx.error.log info; | |
events { | |
worker_connections 1024; | |
} | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# just add a gem dependency for Timecop or require it yourself | |
Given 'the time is $time' do |time| | |
Timecop.freeze Time.parse(time) | |
end | |
When '$time pass' do |time| | |
Timecop.travel future_time(time) | |
Given 'delayed jobs are run' # we use delayed jobs and have some that get scheduled in the future. | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Put this content to ~/.irbrc file (no extension) | |
require "rubygems" | |
begin | |
require "ap" | |
rescue LoadError => err | |
puts "Cannot find awesome_print gem. Please run 'gem install awesome_print' to install it." | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ru: | |
errors: | |
messages: | |
not_found: "не найдена" | |
already_confirmed: "уже подтверждена" | |
not_locked: "не заблокирована" | |
devise: | |
sessions: | |
link: 'Вход' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ru: | |
errors: | |
messages: | |
not_found: "не найдена" | |
already_confirmed: "уже подтверждена" | |
not_locked: "не заблокирована" | |
devise: | |
sessions: | |
link: 'Вход' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Ismael Celis 2010 | |
Simplified WebSocket events dispatcher (no channels, no users) | |
var socket = new ServerEventsDispatcher(); | |
// bind to server events | |
socket.bind('some_event', function(data){ | |
alert(data.name + ' says: ' + data.message) | |
}); |
NewerOlder