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
# command line to deploy the project | |
gcloud functions deploy hello --runtime nodejs14 --trigger-http |
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 analyze.core | |
(:require [clj-kondo.core :as clj-kondo] | |
[clojure.set :as set])) | |
;; checks re-frame's :<- syntax | |
;; to mark dependency subscriptions as used | |
(def analyze-reg-sub | |
"(require '[clj-kondo.hooks-api :as api]) | |
(fn [{node :node}] | |
(let [[_ kw & children] (:children node) |
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 spacedl.spacedl | |
(:require [clojure.string :as string :refer [join starts-with?]])) | |
(.on js/process "uncaughtException" #(js/console.error %)) | |
(defonce http (js/require "http")) | |
(defonce https (js/require "https")) | |
(defonce fs (js/require "fs")) | |
(defn page [gallery-url page-number] |
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
import java.lang.reflect.Method; | |
import java.net.URL; | |
import java.net.URLClassLoader; | |
import java.util.HashMap; | |
import java.util.Map; | |
import java.util.concurrent.ConcurrentHashMap; | |
import org.graalvm.polyglot.Context; | |
import org.graalvm.polyglot.Value; |
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 | |
;; Ported from https://gist.github.com/pyr/d5e17af9c572b681a57de52895437298 to babashka | |
;; klein aims to be a small joker script to mimick | |
;; most of leiningen's default behavior while minimizing | |
;; divergence from standard facilities provided by | |
;; tools.deps | |
;; This is built as a single file script to simplify | |
;; deployment and will avoid requiring any code beyond |
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 | |
(ns script | |
"Make a 'Code Quality' report from clj-kondo for use in GitLab CI. | |
JSON issue format: | |
https://docs.gitlab.com/ee/user/project/merge_requests/code_quality.html#implementing-a-custom-tool | |
Usage: | |
Add the following job in .gitlab-ci.yml: |
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
import json | |
import sqlite3 | |
import sys | |
from bcoding import bencode, bdecode | |
def read(): | |
return dict(bdecode(sys.stdin.buffer)) |
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 | |
(import (java.net ServerSocket)) | |
(require '[clojure.string :as string] '[clojure.java.io :as io]) | |
(with-open [server-socket (new ServerSocket 8080) | |
client-socket (.accept server-socket)] | |
(loop [] | |
(let [out (io/writer (.getOutputStream client-socket)) | |
in (io/reader (.getInputStream client-socket)) |
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
*.clj linguist-language=Clojure | |
*.cljs linguist-language=Clojure |
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
(set-env! | |
:target-path "target" | |
:source-paths #{"src"} | |
:dependencies '[[org.clojure/clojure "1.9.0-RC1"] | |
[org.clojure/clojurescript "1.9.946"] | |
[figwheel-sidecar "0.5.14"]]) | |
(require '[figwheel-sidecar.repl-api :as ra]) | |
(deftask cljs-repl [] |
NewerOlder