Skip to content

Instantly share code, notes, and snippets.

View toydestroyer's full-sized avatar
🚨
Technical debt collection

Sergey Toy toydestroyer

🚨
Technical debt collection
View GitHub Profile
@dideler
dideler / upgrade-postgres-9.3-to-9.4.md
Last active June 8, 2020 03:24
Upgrading PostgreSQL from 9.3 to 9.4 when upgrading Ubuntu 14.04 to 14.10

TL;DR

Create a backup:

pg_dumpall > mybackup.sql

Perform the upgrade:

sudo pg_dropcluster 9.4 main --stop
# Русский перевод для https://github.com/plataformatec/devise/blob/6b0d11ed7a457ef1a338718e2e1819aeb25e943d/config/locales/en.yml (3.4.0)
# Другие переводы на http://github.com/plataformatec/devise/wiki/I18n
ru:
devise:
confirmations:
confirmed: "Ваш адрес электронной почты успешно подтвержден."
send_instructions: "В течение нескольких минут Вы получите письмо с инструкциями по подтверждению Вашего адреса электронной почты."
send_paranoid_instructions: "Если Ваш адрес email есть в нашей базе данных, то в течение нескольких минут Вы получите письмо с инструкциями по подтверждению Вашего адреса электронной почты."
failure:
@JunichiIto
JunichiIto / alias_matchers.md
Last active July 18, 2024 15:03
List of alias matchers in RSpec 3

This list is based on aliases_spec.rb.

You can see also Module: RSpec::Matchers API.

matcher aliased to description
a_truthy_value be_truthy a truthy value
a_falsey_value be_falsey a falsey value
be_falsy be_falsey be falsy
a_falsy_value be_falsey a falsy value
@cserb
cserb / deploy.rb
Created June 3, 2014 16:20
queue_classic and capistrano
namespace :qc do
desc "start queue classic"
task :start do
run "nohup sh #{current_path}/qc_worker start > /dev/null 2>&1 &"
end
desc "stop queue classic"
task :stop do
run "sh #{current_path}/qc_worker stop"
end
@justinweiss
justinweiss / filterable.rb
Last active January 11, 2024 07:28
Filterable
# Call scopes directly from your URL params:
#
# @products = Product.filter(params.slice(:status, :location, :starts_with))
module Filterable
extend ActiveSupport::Concern
module ClassMethods
# Call the class methods with names based on the keys in <tt>filtering_params</tt>
# with their associated values. For example, "{ status: 'delayed' }" would call
@twosixcode
twosixcode / gist:1988097
Created March 6, 2012 18:40
Make "Paste and Indent" the default paste in Sublime Text 2
// swap the keybindings for paste and paste_and_indent
{ "keys": ["super+v"], "command": "paste_and_indent" },
{ "keys": ["super+shift+v"], "command": "paste" }