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 | |
SEARCH_TERM=$1; | |
for jar in $(clj -Spath | tr ":" "\n" | grep -E ".jar$"); do | |
jar -tf "$jar" | grep -i --color $SEARCH_TERM && echo "^----$jar \n"; | |
done; |
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
;; Addapted from python generator found at https://zach.se/project-euler-solutions/10/#python | |
(defn lazy-primes | |
"A lazy sequence that yields prime numbers using Eratosthenes Sieve impl." | |
([] (lazy-primes 2 {})) | |
;; n is the number we are checking for primality | |
;; facts maps composite integers to primes | |
([n facts] | |
(if (not (contains? facts n)) | |
(lazy-seq (cons n ;; yield since its not composite |
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
(defun cider-binding-defit-init () | |
(interactive) | |
(cider-nrepl-request:eval | |
"(in-ns 'defit) | |
(defn get-bindings [form] | |
(cond | |
(vector? form) (into () form) | |
(map? form) (into () (:keys form)) | |
:else (list form)))" | |
(lambda (x) (message "DONE")))) |
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
(defun yank-github-link () | |
"Quickly share a github link of what you are seeing in a buffer. Yanks | |
a link you can paste in the browser." | |
(interactive) | |
(let* ((remote (or (magit-get-push-remote) "origin")) | |
(url (magit-get "remote" remote "url")) | |
(project (if (string-prefix-p "git" url) | |
(substring url 15 -4) ;; git link | |
(substring url 19 -4))) ;; https link | |
(link (format "https://github.com/%s/blob/%s/%s#L%d" |
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
#!/home/jmonetta/bin/lumo | |
(require '[clojure.string :as str]) | |
(require '[goog.string.format]) | |
(def http (js/require "http")) | |
(def addresses {"0xa662c033F936D0e950772aE3934D4f7EA5DCF934" "wage" | |
"0x07906afa8Af02c8739ef59999769533e2a07426A" "reimb"}) | |
;; Etherscan APIkey |