Skip to content

Instantly share code, notes, and snippets.


Hamish Rickerby rickerbh

View GitHub Profile
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 '[ :as io]
'[clojure.string :as string]
'[ :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)