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
| (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"]]) |
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 scrape | |
| (:require [babashka.pods :as pods] | |
| [clojure.walk :as walk])) | |
| (pods/load-pod "bootleg") ;; installed on path, use "./bootleg" for local binary | |
| (require '[babashka.curl :as curl]) | |
| (def clojure-html (:body (curl/get "https://en.wikipedia.org/wiki/Clojure"))) |
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
| #!/usr/bin/env bb | |
| (if *command-line-args* | |
| (def in (str (first *command-line-args*))) | |
| (do | |
| (println "Which bin to run?") | |
| (def in (str *input*)))) | |
| (println "Watching" "*.zig" "->" (str "./" in)) |
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
| #!/bin/bash | |
| ############################################################################################################ | |
| # ---------------------------------------------------------------------- | |
| # ASN/IPv4/Prefix lookup tool. Uses Team Cymru's whois service for data. | |
| # ---------------------------------------------------------------------- | |
| # example usage: | |
| # asn <ASnumber> -- to lookup matching ASN data. Supports "as123" and "123" formats (case insensitive) | |
| # asn <IP.AD.DR.ESS> -- to lookup matching route and ASN data | |
| # asn <ROUTE> -- to lookup matching ASN 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
| // Use Gists to store code you would like to remember later on | |
| console.log(window); // log the "window" object to the console |
NewerOlder