Create or edit: $APP_ROOT/app/helpers/spree/base_helper_decorator.rb
Add this:
Spree::BaseHelper.module_eval do
def seo_url(taxon)
return main_app.categories_path(taxon.permalink)
end
end
How to get RoR running on OS X. | |
# Supported OS | |
OS X: 10.8.4 | |
# PREFACE: | |
* None of these commands should be run as root. Run them as the user you want to do devlopment as. There ARE steps where you'll be prompted for your password. | |
* you SHOULD NOT have mysql installed locally if you intend to use this guide... if you do the "brew install mysql" commands may break it... |
Create or edit: $APP_ROOT/app/helpers/spree/base_helper_decorator.rb
Add this:
Spree::BaseHelper.module_eval do
def seo_url(taxon)
return main_app.categories_path(taxon.permalink)
end
end
#### DON'T RUN THIS ON YOUR PRODUCTION DATA!!!! It will delete stuff !!!!!! | |
### | |
### | |
### FWIW this was from Spree circa 2013 | |
# clear product data | |
Spree::Product.all.map { |p| p.destroy! } | |
Spree::Variant.with_deleted.map { |v| v.destroy! } | |
Spree::StockItem.all.map { |si| si.destroy! } |
I'm trying to find rows in a table where there have been other rows created within a minute of them.
You can't use group by for this because certain rows will exist inside of 2 groups.
timestamp minute logical group ----------------------------------------------------------- 2010-01-01 09:09:01 A1 2010-01-01 09:09:58 A1, A2
I hereby claim:
To claim this, I am signing this object:
#!/bin/sh | |
#PROJECT_NAME=`basename $PWD` | |
PROJECT_NAME=`basename $PWD | tr '.' '-'` | |
PROJECT_DIR=$PWD | |
tmux has-session -t $PROJECT_NAME 2>/dev/null | |
if [ "$?" -eq 1 ] ; then | |
echo "No Session found. Creating and configuring." | |
pushd $PROJECT_DIR | |
tmux new-session -d -s $PROJECT_NAME |
# RVM notes | |
# when updating OS versions of Xcode (or any of the C/C++ underbits) | |
# | |
# if OSx dev is ahead of HomeBrew you may need xcode beta crap from apple's | |
# download dev site. | |
# | |
# you need to rebuild rvm | |
# https://stackoverflow.com/questions/9663005/how-do-i-recompile-a-ruby-with-rvm | |
# | |
# rvm reinstall [RUBY] |
# RVM notes | |
# when updating OS versions of Xcode (or any of the C/C++ underbits) | |
# | |
# if OSx dev is ahead of HomeBrew you may need xcode beta crap from apple's | |
# download dev site. | |
# | |
# you need to rebuild rvm | |
# https://stackoverflow.com/questions/9663005/how-do-i-recompile-a-ruby-with-rvm | |
# | |
# rvm reinstall [RUBY] |
#!/bin/bash | |
MyShellVar=$(ls /tmp) | |
/usr/bin/osascript << EOF | |
set MyApplVar to do shell script "echo '$1'" | |
tell application "Finder" | |
activate | |
set result to display dialog MyApplVar buttons {"OK", "OK2"} default button "OK" | |
end tell |
#!/bin/sh | |
bundler_version=$(bundler --version | awk '{print $3}') | |
gemfile_version=$(tail -1 Gemfile.lock | awk '{print $1}') | |
echo "bundler_version is $bundler_version" | |
echo "gemfile_version is $gemfile_version" | |
if [ "$bundler_version" = "$gemfile_version" ]; then | |
bundler "$@" | |
else | |
echo "ALERT!!!! *** CHANGE YOUR BUNDLER VERSION!!!! ***" |