Skip to content

Instantly share code, notes, and snippets.

View Freika's full-sized avatar

Evgenii Burmakin Freika

View GitHub Profile
@Freika
Freika / current-gemfile.txt
Last active August 29, 2015 14:03
Current Gemfile
source 'https://rubygems.org'
gem 'rails', '4.1.0'
gem 'pg'
gem 'sdoc', '~> 0.4.0', group: :doc
gem 'friendly_id'
gem 'devise'
gem 'simple_form'
gem 'jquery-rails'
# SQLite version 3.x
# gem install sqlite3
#
# Ensure the SQLite 3 gem is defined in your Gemfile
# gem 'sqlite3'
#
default: &default
adapter: postgresql
pool: 5
timeout: 5000
@Freika
Freika / simple_form.rb
Created July 5, 2014 19:35
simple_form boostrap initializer
inputs = %w[
CollectionSelectInput
DateTimeInput
FileInput
GroupedCollectionSelectInput
NumericInput
PasswordInput
RangeInput
StringInput
TextInput
@Freika
Freika / deploy.rb
Created July 12, 2014 15:26
deploy.rb for locum.com
# По умолчанию для дистрибуции проектов используется Bundler.
# Эта строка включает автоматическое обновление и установку
# недостающих gems, указанных в вашем Gemfile.
#
## !!! Не забудьте добавить
# gem 'capistrano'
# gem 'unicorn'
#
# в ваш Gemfile.
#
rails new app --skip-test-unit --skip-bundle -d postgresql
=Navigating=
visit('/projects')
visit(post_comments_path(post))
=Clicking links and buttons=
click_link('id-of-link')
click_link('Link Text')
click_button('Save')
click('Link Text') # Click either a link or a button
click('Button Value')
@Freika
Freika / Gemfile
Created August 2, 2014 16:52 — forked from remino/Gemfile
# Gemfile
gem 'kramdown'
<% flash.each do |type, message| %>
<div class="alert <%= alert_class_for(type) %> alert-dismissible fade in">
<button type="button" class="close" data-dismiss="alert"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
<%= message %>
</div>
<% end %>
@Freika
Freika / gist:3902c7672992c51324d3
Created September 24, 2014 08:38
klops curl error
MacBook-Air-Frey:klops frey$ curl https://s3-eu-west-1.amazonaws.com/klops-backup/klops_backup/klops/2014.07.10.03.00.05/klops.tar > db.dump.tar; tar xvf db.dump.tar; cd klops/databases/PostgreSQL/; gunzip klops_production.sql.gz; mv klops_production.sql ../../../klops_production.sql
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 243 0 243 0 0 271 0 --:--:-- --:--:-- --:--:-- 271
tar: Unrecognized archive format
tar: Error exit delayed from previous errors.
-bash: cd: klops/databases/PostgreSQL/: No such file or directory
gunzip: can't stat: klops_production.sql.gz (klops_production.sql.gz.gz): No such file or directory
mv: rename klops_production.sql to ../../../klops_production.sql: No such file or directory
You have new mail in /var/mail/frey
rvm env -- `rvm current` > .powenv