Skip to content

Instantly share code, notes, and snippets.

@cddr
Created November 18, 2020 12:33
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cddr/f269b4465a823e567bd85eb3aa16ed0d to your computer and use it in GitHub Desktop.
Save cddr/f269b4465a823e567bd85eb3aa16ed0d to your computer and use it in GitHub Desktop.
[diff "clj"]
xfuncname = "^(\\((def|ns)([^\\[])*).*$"
*.clj diff=clj
@cddr
Copy link
Author

cddr commented Nov 18, 2020

.gitconfig goes in $HOME (you probably already have this file)
attributes goes in $HOME/.config/git (might need to create this dir)

@cddr
Copy link
Author

cddr commented Nov 18, 2020

example hunk in context of ns

diff --git a/src/cddr/ksml/core.clj b/src/cddr/ksml/core.clj
index 1fbcb4c..252041b 100644
--- a/src/cddr/ksml/core.clj
+++ b/src/cddr/ksml/core.clj
@@ -2,11 +2,11 @@ (ns cddr.ksml.core
   (:require
    [cddr.ksml.eval :as ksml.eval])
   (:import
-   (org.apache.kafka.streams KafkaStreams StreamsConfig)
-   (org.apache.kafka.streams.kstream KStreamBuilder Predicate)))
+   (org.apache.kafka.streams StreamsBuilder KafkaStreams StreamsConfig)
+   (org.apache.kafka.streams.kstream Predicate)))

example hunk in context of defn

 (defn kafka-config
   [config]
@@ -14,6 +14,7 @@ (defn kafka-config
     config
     (StreamsConfig. config)))
 
+;; v1

example hunk in context of defrecord

diff --git a/src/uri/entities.clj b/src/uri/entities.clj
index 90a5a76..1196be6 100644
--- a/src/uri/entities.clj
+++ b/src/uri/entities.clj
@@ -122,7 +122,7 @@ (defrecord VmEntity
                                                 template offering)]
         (if (and vm-state (not= :destroyed vm-state))
           (if (some? license-usage)
-            [vm-usage license-usage]
+            [vm-usage (:id license-usage)]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment