This file contains hidden or 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
| name: networking-bug | |
| recipe: pantheon | |
| config: | |
| framework: wordpress | |
| site: networking-bug | |
| id: fake-site-id |
This file contains hidden or 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
| # evil cowsay cd | |
| cd_() { if [ "$((1 + RANDOM % 10))" = 3 ]; then _out="I'm sorry $(whoami), I can't do that for you."; $(if [ $(which cowsay) ]; then echo cowsay; else echo echo; fi) "$_out"; else cd; fi } | |
| alias cd='cd_' |
This file contains hidden or 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
| <?php | |
| /* | |
| * Disallow certain choices based on post_type and/or page template | |
| */ | |
| add_filter('acf/prepare_field/key=field_5c6c913e0ea64', function(array $field) { | |
| //unset($field['choices']['full-width-image-carousel']); | |
| //unset($field['choices']['full-width-image']); | |
| return $field; |
This file contains hidden or 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
| <?php | |
| /** | |
| * Author: Coby Tamayo | |
| */ | |
| use MyProject\Post\Page; | |
| $page = new Page(); | |
| // Get common/site-wide data |
This file contains hidden or 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 core) | |
| (defn- keyed-by [coll f] | |
| (into {} (map (fn [x] [(f x) x]) coll))) | |
| (defn- vconj [coll & xs] | |
| (vec (apply conj coll xs))) | |
| (def people [{:name "Jeff" | |
| :instrument "Mbira"} |
This file contains hidden or 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 app.motion | |
| (:require | |
| [framer-motion :refer (motion AnimatePresence useSpring useMotionValue useTransform useViewportScroll) :as motion] | |
| [cljs-bean.core :refer [bean ->clj ->js]])) | |
| (def div | |
| (.-div motion)) | |
| (def span | |
| (.-span motion)) | |
| (def li | |
| (.-li motion)) |
This file contains hidden or 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 macro-playground.core) | |
| (defmacro square [x] | |
| `(let [x# ~x] | |
| (* x# x#))) | |
| (comment | |
| ;; Example expansions for the when* macro: |
This file contains hidden or 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
| /* | |
| * SMOOTH SCROLLING IN PURE CSS | |
| * | |
| * CREDIT: https://twitter.com/zachleat/status/1296852504777457664 | |
| * DEMO: https://smooth-scrolling.glitch.me/ | |
| */ | |
| @media (prefers-reduced-motion: no-preference) { | |
| html { | |
| scroll-behavior: smooth; | |
| } |
This file contains hidden or 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
| (defn oxford-comma [phrases] | |
| (if (> (count phrases) 2) | |
| (join ", and " [(join ", " (butlast phrases)) (last phrases)]) | |
| (join " and " phrases))) | |
| (oxford-comma []) ;; => "" | |
| (oxford-comma ["one"]) ;; => "one" | |
| (oxford-comma ["one" "two"]) ;; => "one and two" | |
| (oxford-comma ["one" "two" "three"]) ;; => "one, two, and three" | |
| (oxford-comma ["one" "two" "three" "four"]) ;; => "one, two, three, and four" |
This file contains hidden or 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
| (defn translate-string [s] s) | |
| ;; TODO ideas for i18n | |
| ;; Dispatch on content field vs. hard-coded transation keys in markup... | |
| (def html [:html {:lang "en"} | |
| [:head | |
| [:title :text/hello]] | |
| [:body | |
| [:main | |
| [:h1 :text/hello] | |
| [:h2 :text/invalid] |