-
Ensure turbolinks is disabled for good measure
- comment out gem
- remove from javascript asset pipeline
- remove from application layout
-
Add the following gems to Gemfile in a development, test group
hirb
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
// ---------------------------------------- | |
// Folder jQuery plugin | |
// ---------------------------------------- | |
// Usage: | |
// | |
// $('.folder.month').folder(); | |
// $('.folder.year').folder({ | |
// iconOpen: 'fa-folder-open', | |
// iconClosed: 'fa-folder' | |
// }); |
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
[ | |
{ "keys": ["super+shift+w"], "command": "close_all" } | |
] |
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
<h1>HTML Kitchen Sink</h1> | |
<h2>a</h2> | |
<a href="#">a</a> | |
<br> | |
<h2>abbr</h2> | |
<abbr title="abbr">Mr. Mrs. Dr.</abbr> | |
<br> |
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
module AdapterAcknowledgeable | |
def self.included(base) | |
base.extend(ClassMethods) | |
end | |
module ClassMethods | |
def adapter | |
self.connection.instance_values["config"][:adapter] | |
end | |
end |
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
-- ------------------------------------------------ | |
-- Weekly | |
-- ------------------------------------------------ | |
-- Revenue for week range | |
SELECT | |
DATE(weeks) AS week, | |
COALESCE(SUM(order_contents.quantity * products.price), 0) AS amount | |
FROM GENERATE_SERIES( | |
DATE_TRUNC('WEEK', DATE('2015-9-1')), |
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
# Array.new(2**5) do |i| | |
# [i / 2**4, i / 2**3 % 2, i / 2**2 % 2, i / 2 % 2, i % 2] | |
# end | |
# integer_combinations(2, 5) | |
# => [[0, 0, 0, 0, 0], [0, 0, 0, 0, 1], [0, 0, 0, 1, 0], [0, 0, 0, 1, 1], [0, 0, 1, 0, 0], [0, 0, 1, 0, 1], [0, 0, 1, 1, 0], [0, 0, 1, 1, 1], [0, 1, 0, 0, 0], [0, 1, 0, 0, 1], [0, 1, 0, 1, 0], [0, 1, 0, 1, 1], [0, 1, 1, 0, 0], [0, 1, 1, 0, 1], [0, 1, 1, 1, 0], [0, 1, 1, 1, 1], [1, 0, 0, 0, 0], [1, 0, 0, 0, 1], [1, 0, 0, 1, 0], [1, 0, 0, 1, 1], [1, 0, 1, 0, 0], [1, 0, 1, 0, 1], [1, 0, 1, 1, 0], [1, 0, 1, 1, 1], [1, 1, 0, 0, 0], [1, 1, 0, 0, 1], [1, 1, 0, 1, 0], [1, 1, 0, 1, 1], [1, 1, 1, 0, 0], [1, 1, 1, 0, 1], [1, 1, 1, 1, 0], [1, 1, 1, 1, 1]] | |
def integer_combinations_of(n, e) | |
Array.new(n**e) do |i| |
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
git config --global alias.lg "log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative" |
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
<% if object.errors.present? %> | |
<div class="alert alert-danger"> | |
<% | |
field ||= nil | |
error_messages_for(object, field) do |error| | |
%> | |
<%= error %> | |
<br/> | |
<% end %> | |
</div> |
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
<% unless flash.empty? %> | |
<% flash.each do |key, value| %> | |
<div class="main-flash alert alert-<%= flash_css_class(key) %> text-center" style="border-radius: 0;"> | |
<%= value %> | |
</div> | |
<% end %> | |
<% end %> |