Skip to content

Instantly share code, notes, and snippets.


Thomas Sample MFRWDesign

  • Away
View GitHub Profile
MFRWDesign / postgres-install-help.txt
Last active Dec 10, 2018
This should be of help for working with different versions of postgres and for working with postgres installed on a non-standard port with Rails.
View postgres-install-help.txt
Postgres commands:
pg_wrapper pgql -U JohnDoe -d postgres ---> login
psql --cluster 10/karma -U JohnDoe -d postgres
\l ---> list databases
\du ---> list roles
\dn ---> list schemas
\dt ---> list tables
\q ---> quit
MFRWDesign / solidus_google_analytics.html.erb
Created Jan 30, 2018
Solidus Multi-tenant Google Analytics Tracker
View solidus_google_analytics.html.erb
<% if tracker = Spree::Tracker.current(current_store) %>
<script id="solidus_trackers">
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
ga('create', '<%= tracker.analytics_id %>', 'auto' {'name': '<%= %>'});
ga('<%= %>.require', 'displayfeatures');
ga('<%= %>.send', 'pageview');
<% if @order && order_just_completed?(@order) %>