Skip to content

Instantly share code, notes, and snippets.

Dan Lebrero dlebrero

Block or report user

Report or block dlebrero

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View ReflectData.json
{
"type": "record",
"name": "SurveyedLocale",
"namespace": "com.gallatinsystems.surveyal.domain",
"fields": [
{
"name": "organization",
"type": "string"
},
{
View good-resource-management.clj
(import 'java.text.SimpleDateFormat)
(let [lock (Object.)
date-format (SimpleDateFormat. "HH:mm:ss")]
(defn log [& msgs]
(locking lock
(apply println (str (.format date-format (java.util.Date.))) "-" (.getName (Thread/currentThread)) "-" msgs))))
;; This is just for logging the connection number
(def connections-created (atom 0))
View no-so-good-resource-management.clj
(import 'java.text.SimpleDateFormat)
(let [lock (Object.)
date-format (SimpleDateFormat. "HH:mm:ss")]
(defn log [& msgs]
(locking lock
(apply println (str (.format date-format (java.util.Date.))) "-" (.getName (Thread/currentThread)) "-" msgs))))
;; This is just for logging the connection number
(def connections-created (atom 0))
@dlebrero
dlebrero / plantuml.puml
Created Apr 5, 2017
A PlantUML example
View plantuml.puml
@startuml
actor browser
participant nginx
participant backend
participant keycloak
browser -> nginx: /library (558.0B)
browser <-- nginx: 304 (266.0B)
browser -> backend: /api/library (464.0B)
browser <-- backend: 302 [OAuth_Token_Request_State] (547.0B)
You can’t perform that action at this time.