This file contains 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
Rake task for finding unused images in rails app. | |
It requires 'ack' http://betterthangrep.com/ | |
MacOS: brew install ack | |
Linux: apt-get install ack-grep | |
Before lunch a task put .ackrc to home directory like ~/.ackrc |
This file contains 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
# INLINE BOOTSTRAP FORMS | |
# | |
# all inputs will render in inline format (by default) | |
# label class='col-sm-4 label-control' | |
# div class='col.sm-4' | |
# input class='form-control' | |
# | |
simple_form_for resource, | |
html: {class: 'form-horizontal'}, | |
defaults: { input_wrapper_html: { class: 'col-sm-8' }, |
This file contains 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
require 'xpath' | |
module Features | |
module SelectDatesAndTimes | |
# select_date DateTime.now, from: 'label_name' | |
def select_date (date, options = {}) | |
date = Date.parse(date.to_s) | |
# lookup id prefix by label |
This file contains 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
(function($){ | |
"use strict"; | |
var startY; | |
var defaults = { | |
"$these": [], | |
"touchstartInit": false, | |
"touchmoveInit": false | |
}; |
This file contains 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
# Ignore bundler config | |
/.bundle | |
# Ignore the default SQLite database. | |
/db/*.sqlite3 | |
# Ignore all logfiles and tempfiles. | |
/log/*.log | |
/tmp | |
/public/assets |
This file contains 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
require 'sprockets/railtie' | |
Rails.application.assets.register_postprocessor 'text/css', :sass_bem_class_builder do |context, data| | |
data.gsub(/([a-zA-Z0-9\-]+)[ ]([_]+)/i){ $1 + $2 } | |
end |