I hereby claim:
- I am johanmynhardt on github.
- I am johanmynhardt (https://keybase.io/johanmynhardt) on keybase.
- I have a public key whose fingerprint is 0B69 29B9 7384 016E 327F 0AEF 097E 2F0B A14A 6C4E
To claim this, I am signing this object:
| (ns user | |
| "Simple Syndication XML Extractor to navigate the available AWS Feed." | |
| (:require [clojure.data.xml :as xml] | |
| [clojure.java.io :as io] | |
| [clojure.pprint :refer [pprint]] | |
| [clojure.string :as str] | |
| [clojure.zip :as z])) | |
| (def aws-feed-url "https://aws.amazon.com/about-aws/whats-new/recent/feed/") |
| #!/usr/bin/env bb | |
| (ns new-clj | |
| "Utility to create new deps or bb projects." | |
| (:require [clojure.tools.cli :as cli] | |
| [clojure.pprint :refer [pprint]] | |
| [clojure.java.io :as io] | |
| [clojure.string :as str])) | |
| (def cli-opts-spec | |
| [["-t" "--target TARGET" |
| ;; This works easiest using the thread-first macro ( -> ) | |
| ;; I couldn't get it to work with fetch().then().then()[...].catch() for error handling. | |
| (fn [] | |
| (-> | |
| (js/fetch "/weather-data.json") | |
| (.then | |
| (fn [resp] | |
| (println "status: " (.-status resp)) | |
| (when (= 200 (.-status resp)) | |
| (-> |
| const renderTSV = input => input | |
| .split('\n') | |
| .map(r => r.replace(/\t/g, ' __ ')) | |
| .join('\n'); | |
| const parseIDs = input => input | |
| .split(/(\d{4,})/) | |
| .map(x => x.trim()) | |
| .filter(x => new RegExp(/\d+/).exec(x)) | |
| .map(Number) |
| /** | |
| * Add the specified number of days to the date provided. | |
| */ | |
| var addDays = (date, days) => { | |
| var newDate = new Date(date); | |
| newDate.setDate(newDate.getDate() + days); | |
| return newDate; | |
| } | |
| // example: |
I hereby claim:
To claim this, I am signing this object:
| const dd2dms = (latOrLong) => { | |
| latOrLong = (typeof latOrLong === 'number') ? ''+latOrLong : latOrLong; //convert to string | |
| const nan2S = (input) => (isNaN(input) || 'NaN' === input) ? '0' : `${input}`; | |
| const result = { | |
| sign: '', | |
| deg: '0', | |
| min: '0', | |
| sec: '0' |