- Atom Editor
- iTerm2 + Fish2
- Spark
- Karabiner + Seil + LatvianHash
- Postgres app
- Dashlane
- Flint
- Xee
Replace <project> with myapp and you are good to go.
# Make new gemset of latest ruby found at https://www.ruby-lang.org/en/downloads/
$ rvm install 2.2.2
$ rvm use 2.2.2@<project> --create
$ gem install bundler
$ gem install rails
# Init rails app
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
base: &base | |
adapter: postgresql | |
encoding: utf-8 | |
pool: 5 | |
username: augusts | |
database: sha | |
password: | |
development: | |
<<: *base |
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
# Your init script | |
# | |
# Atom will evaluate this file each time a new window is opened. It is run | |
# after packages are loaded/activated and after the previous editor state | |
# has been restored. | |
# | |
# An example hack to log to the console when each text editor is saved. | |
# | |
# atom.workspace.observeTextEditors (editor) -> | |
# editor.onDidSave -> |
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
class Numeric | |
# 200.01.safe_percent(50) #=> 25.% | |
def safe_percent(part) | |
if self > 0 | |
if part >= 0 | |
return 100*part.to_f/self.to_f | |
else | |
raise "Sorry, no negative numbers please" | |
end | |
elsif self == 0 |
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
{ | |
#<PipelinePaymentSystem:0x007f885982bed0> { :id => 111, :status => "active", :system_type => "base", :amount => 2, :pipeline_id => 6, :payment_system_id => 6, :currency_id => 1, :created_at => Mon, 21 Sep 2015 12:33:41 EEST +03:00, :updated_at => Mon, 21 Sep 2015 12:33:42 EEST +03:00, :app_offer_id => nil, :direct_sell_type => "levels2_only", :design_file => nil } => { | |
:started => 4, | |
:paid => 0, | |
:cr => 0.0, | |
:retry_seen => 0, | |
:retry_seen_percent => 0.0, | |
:retried => 0, | |
:retried_percent => 0, | |
:paid_in_retry => 0, |
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
# required libraries always in first lines | |
require 'resque/server' | |
Rails.application.routes.draw do | |
# 1. External engines and services are mounted first | |
mount RailsAdmin::Engine => '/super_admin', as: 'rails_admin' | |
# 2. Always use "smart" redirects, conserving original parameters via http://stackoverflow.com/questions/16943169/rails-routes-how-to-pass-all-request-params-in-a-redirect | |
get '', to: redirect{ |_, request| ["/#{I18n.locale}", request.params.to_query].reject(&:blank?).join("?") } | |