Skip to content

Instantly share code, notes, and snippets.

@rickerbh
rickerbh / octopress-to-cryogen.clj
Created Jul 26, 2020
Babashka script to port posts from jekyll/octopress format to cryogen
View octopress-to-cryogen.clj
(require '[clojure.java.io :as io]
'[clojure.string :as string]
'[clojure.tools.cli :refer [parse-opts]])
(def cli-options
[["-o" "--out DIR" "Output directory"
:default "out"]
["-s" "--source SOURCE" "Source directory"
:default "source/_posts"]
["-h" "--help"]])
View checkouts_helper.rb
module CheckoutsHelper
def checkout_progress
steps = Checkout.state_names.reject { |n| n == "complete" }.map do |state|
next if state == "confirm" and not (Gateway.current && Gateway.current.payment_profiles_supported?)
text = t("checkout_steps.#{state}")
css_classes = []
current_index = Checkout.state_names.index(@checkout.state)
state_index = Checkout.state_names.index(state)