I hereby claim:
- I am jhirbour on github.
- I am jhirbour (https://keybase.io/jhirbour) on keybase.
- I have a public key whose fingerprint is B7F7 861E C8BE 0D35 28BB 1854 305C E94C 4CEC D7F2
To claim this, I am signing this object:
| # History | |
| # history is managed by rvm (~/.rvm/scripts/irbrc.rb) | |
| # IRB.conf[:SAVE_HISTORY] = 1000 | |
| # | |
| # loaded by rvm | |
| # require 'rubygems' | |
| # require 'pp' | |
| if defined? Rails && Rails.env | |
| require 'logger' |
| #!/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!!!! ***" |
| #!/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 |
| # 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/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 |
I hereby claim:
To claim this, I am signing this object:
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
| #### 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! } |
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