##Shops
- Dynamo
- Ballistiq
- SmashingBoxes
- Code Genome
- Porkepic *Saint-Hubert(FR)
- Lodgem *Sherbrooke
##Startups
// JavaScript | |
let hidePage = () => { | |
let payload = { | |
object_type: 'page', | |
object_id: 123, | |
namespace: 'seo', | |
key: 'hidden', | |
value: 1, | |
value_type: 'number_integer' | |
}; |
// app/javascript/shopify_app/shopify_app.js | |
import { getSessionToken } from "@shopify/app-bridge-utils"; | |
import $ from "jquery"; | |
const SESSION_TOKEN_REFRESH_INTERVAL = 2000; // Request a new token every 2s | |
async function retrieveToken(app) { | |
window.sessionToken = await getSessionToken(app); | |
} |
##Shops
##Startups
Since I did not want to constantly re-invent the wheel I will write down my choices for putting together my Cuba template.
rbenv local 2.2.3
or somesuchGemfile.lock
to git
tooroutes
and config
directories, want to put stuff in thereCuba
route in routes/default.rb
#Goal Deploy your Rails App super easily with Dokku on Digital Ocean cheap cheap!
##Notes
Procfile
with the command to start up your application serverLogentries
(not in this guide)AppSignal
or New Relic
(not in this guide)# Ways to execute a shell script in Ruby | |
# Example Script - Joseph Pecoraro | |
cmd = "echo 'hi'" # Sample string that can be used | |
# 1. Kernel#` - commonly called backticks - `cmd` | |
# This is like many other languages, including bash, PHP, and Perl | |
# Returns the result of the shell command | |
# Docs: http://ruby-doc.org/core/classes/Kernel.html#M001111 |
To replace $130 with 130&thinesp;$ | |
Search: \$(\d+) | |
Replace: \1 $ | |
To strip classes/id/style | |
Search: \s+class="[^"]*" | |
Replace: |
<% pages = sitemap.resources.find_all{|p| p.source_file.match(/\.html/) } %> | |
<?xml version="1.0" encoding="UTF-8"?> | |
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"> | |
<% pages.each do |p| %> | |
<url> | |
<loc>http://youdomain.com/<%=p.destination_path.gsub('/index.html','')%></loc> | |
<priority>0.7</priority> | |
</url> | |
<% end %> | |
</urlset> |