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
;; Using javax.imageio and funcool/cats | |
;; it's leaking fds, take care! | |
(defn valid-jpg-image? [image-url] | |
(let [image-input (-> image-url io/input-stream ImageIO/createImageInputStream) | |
encoders (-> (ImageIO/getImageReadersByFormatName "jpg") iterator-seq) | |
image-result (map #(either/try-either (doto % (.setInput image-input) (.read 0))) encoders)] | |
(->> image-result either/rights not-empty boolean))) |
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
import { Wrapper } from "@googlemaps/react-wrapper"; | |
const ParentComponentThatWillReceiveGoogleMap = () => { | |
return <Wrapper apiKey={"42-l337-lol-bbq"}> | |
<MyGoogleMapComponent/> | |
</Wrapper> | |
} |
OlderNewer