Skip to content

Instantly share code, notes, and snippets.

View runswithd6s's full-sized avatar

Chad Walstrom runswithd6s

View GitHub Profile
@ericnormand
ericnormand / 00_script.clj
Last active February 22, 2025 10:41
Boilerplate for running Clojure as a shebang script
#!/bin/sh
#_(
#_DEPS is same format as deps.edn. Multiline is okay.
DEPS='
{:deps {clj-time {:mvn/version "0.14.2"}}}
'
#_You can put other options here
OPTS='
@liquidz
liquidz / aws_logs_core.clj
Last active June 3, 2021 18:55
AWS CLI wrapping script by Babashka
(ns aws.logs.core
"AWS CLI wrapper for `logs` service
https://docs.aws.amazon.com/cli/latest/reference/logs/index.html
You need to install AWS CLI and run `aws configure` beforehand."
(:require
[cheshire.core :as json]
[clojure.java.shell :as shell]
[clojure.string :as str]))
@holyjak
holyjak / http-server.bb
Last active September 6, 2024 15:17
Babashka HTTP server for serving static files, similar to `python -m http.server` but more flexible :)
#!/usr/bin/env bb
#_" -*- mode: clojure; -*-"
;; Based on https://github.com/babashka/babashka/blob/master/examples/image_viewer.clj
(ns http-server
(:require [babashka.fs :as fs]
[clojure.java.browse :as browse]
[clojure.string :as str]
[clojure.tools.cli :refer [parse-opts]]
[org.httpkit.server :as server]