This file contains 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 sh | |
url=$1 | |
start=$2 end=$3 | |
noverbose='-hide_banner -loglevel error' | |
ffmpeg \ | |
$noverbose \ |
This file contains 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 | |
(require '[clojure.java.io :as io]) | |
(require '[babashka.process :refer [process]]) | |
(def f (io/file "/tmp/colortemp")) | |
(def MAX 6500) | |
(def MIN 1000) | |
(def INCR 100) |
This file contains 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
### Keybase proof | |
I hereby claim: | |
* I am andreivolt on github. | |
* I am andreivolt (https://keybase.io/andreivolt) on keybase. | |
* I have a public key ASAxJdnYQ3o1GxSg32G9DOG8VMFNAXEikp-e2ZwTUCyBMwo | |
To claim this, I am signing this object: |
This file contains 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 favila.read-edn.tag-readers | |
"Common tag-reader maps for edn." | |
(:require datomic.db | |
datomic.function | |
datomic.codec) | |
(:import java.net.URI)) | |
(defmethod print-method URI [^URI x ^Writer w] | |
(doto w | |
(.write "#uri ") |
This file contains 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
(def example-map | |
{:a "foo" :b "bar" :other-stuff | |
{:item-1 ["hello" "clojure"], | |
:item-2 ["hello" "hiccup"], | |
:another-map | |
{:x "foo" :y "bar" :z "baz"}} | |
:c "wowza sauce"}) | |
(defn map-to-html-list | |
"Clojure map to nested HTML list. Optional list-type and wrapper params taken as keywords hiccup understands, and optional sep parameter for the string to show key-value associations" |
This file contains 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
jo \ | |
input=$(jo text="$*") \ | |
voice=$( | |
jo \ | |
languageCode=en-us \ | |
name=en-US-Wavenet-C \ | |
ssmlGender=FEMALE) \ | |
audioConfig=$(jo audioEncoding=OGG_OPUS) \ | |
| http https://texttospeech.googleapis.com/v1beta1/text:synthesize key==$GCLOUD_API_KEY \ | |
| jq -r .audioContent \ |
This file contains 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 nix-shell | |
#! nix-shell -i bash -p graalvm11-ce babashka clojure jo | |
usage() { | |
cat <<EOF | |
build native binaries for Clojure using GraalVM | |
Usage: ${0##*/} extra_deps entrypoint java_reflection_classes | |
Example: ${0##*/} 'org.clojure/tools.deps.alpha {:mvn/version "0.12.1003"}' find-deps.core java.io.PushbackReader java.io.OutputStreamWriter | |
EOF |
This file contains 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 nix-shell | |
#! nix-shell -i bb -p graalvm11-ce babashka clojure | |
(require '[clojure.java.io :as io] | |
'[clojure.java.shell :refer [sh]] | |
'[cheshire.core :as json] ; only for eval in editor | |
'[clojure.edn :as edn] | |
'[clojure.string :as s] | |
'[clojure.tools.cli :refer [parse-opts]]) |
This file contains 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 bash | |
jo direct_trackings=$(jo -a $(jo tracking_number=$1)) \ | |
| http https://track.aftership.com/api/v2/direct-trackings/batch \ | |
| jq -r ' | |
.data.direct_trackings | |
| first | |
| .tracking.checkpoints[] | |
| [ | |
( |
This file contains 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 | |
;; convert.clj -- babashka edn/json/yaml to edn/json/yaml converter | |
;; Author: github.com/KGOH/ | |
;; Source: gist.github.com/KGOH/50c0f66022fea2ac173518a143238058 | |
;; Version: 2020.4 | |
; Usage example: | |
; In Emacs: i.imgur.com/TIEDmga.mp4 | |
; $ convert.clj edn <<< '{"foo": "bar"}' | |
; {:foo "bar"} |
OlderNewer