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
Rails.application.routes.draw do | |
get '/(:locale)/products/(:category)/(page/:page).:extension', | |
:to => 'products#index', | |
:as => :products, | |
:constraints => { | |
:locale => /[a-z]{2}/, | |
:category => /.+?/, | |
:page => /\d+/ | |
}, |
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
javascript:(function($){var width=990;var columns=25;var gutter=10;var column_width=(width-(gutter*(columns-1)))/columns;var grid_container=$('<div id="grid-container"></div>');grid_container.css('z-index','999999');grid_container.css('position','absolute');grid_container.css('top',0);grid_container.css('left',0);grid_container.css('width','100%');grid_container.css('height',$(document).height()+'px');var grid=$('<div id="grid"></div>');grid.css('width',width+'px');grid.css('margin','0 auto');var column=$('<div id="column"></div>');column.css('height',$(document).height()+'px');column.css('background-color','rgba(50,150,255,.2)');column.css('width',column_width+'px');column.css('float','left');column.css('margin-left',gutter+'px');grid.append(column.clone().css('clear','left').css('margin',0));for(var i=0;i<(columns-1);i++){column.clone().appendTo(grid);};grid_container.append(grid);$('body').append(grid_container);}(jQuery)); |
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
#!/usr/bin/env ruby | |
SPECIAL_TOKEN = 'SpecialTokenForSearch' | |
WITHOUT_MERGES = "--no-merges" | |
GIT_COMMIT_LINK="https://github.com/some_projects/commit/:commit" | |
cmd = `git show-ref --tags` | |
tags = [] | |
cmd.each do |l| | |
tag_commit, tag_name = l.chomp.split(" ") |
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
gem: --no-ri --no-rdoc |
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
.box-shadow(@x: 0, @y: 1px, @blur: 1px, @color: #000) { | |
box-shadow: @x @y @blur @color; | |
-moz-box-shadow: @x @y @blur @color; | |
-webkit-box-shadow: @x @y @blur @color; | |
} | |
.inset-box-shadow(@x: 0, @y: 1px, @blur: 1px, @color: #000) { | |
box-shadow: inset @x @y @blur @color; | |
-moz-box-shadow: inset @x @y @blur @color; | |
-webkit-box-shadow: inset @x @y @blur @color; |
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 "script/rails" == $0 | |
ActiveRecord::Base.logger = Logger.new(STDOUT) | |
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
if Rails.env.production? | |
require 'fileutils' | |
FileUtils.mkdir_p(Rails.root.join("tmp", "stylesheets", "admin")) | |
template_path = "#{Gem.loaded_specs['activeadmin'].full_gem_path}/lib/active_admin/stylesheets" | |
old_compile_path = "#{Rails.root}/public/stylesheets/admin" | |
new_compile_path = "#{Rails.root}/tmp/stylesheets/admin" | |
Sass::Plugin::remove_template_location template_path, old_compile_path | |
Sass::Plugin::add_template_location template_path, new_compile_path |
NewerOlder