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
//Option 1 - With flex | |
.Product-wrapper { | |
display: flex; | |
justify-content: space-around; | |
max-width: min(80%, 1080px); | |
.Product { | |
margin-bottom: 30px; | |
flex: 1 1 280px; | |
} | |
} |
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
(function(){ | |
var _products = {}; | |
if(!window.SwymCallbacks){window.SwymCallbacks = [];} | |
window.SwymCallbacks.push(function(){ | |
_swat.fetchWrtEventType(function(products){ | |
// render products - array of objects with same structure as productData | |
// {{Insert your rendering function}} | |
renderProducts(products); | |
// products count - products.length | |
// {{Insert your count update}} |
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
(ns sw.ring-ip-whitelist | |
"Just for reference, to show the :require for this to work" | |
(:require [clojure.string :as str])) | |
(defn- header-value | |
[request k] | |
(-> request :headers (get k))) | |
(defn- get-host-addr [request] | |
(or (header-value request "x-forwarded-for") | |
(:remote-addr request) |
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
;; Fire up a REPL and try it out | |
(let [list [1 2 3] | |
[x y z] list] | |
(println x y z)) | |
;; Better one | |
(let [[x y z a :as list] [1 2 3]] | |
(println x y z a list)) | |