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
(ns hoplonfx.demo.app | |
(:require | |
[hoplonfx.ui :as ui] | |
[hoplonfx.cell :refer :all]) | |
(:refer hoplonfx.ui :rename {cell fxcell}) | |
(:import [javafx.geometry Insets Pos] | |
[com.jfoenix.controls JFXButton])) | |
(defn jfx-button | |
[& args] |
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
package hoplonfx; | |
import java.util.List; | |
import java.util.HashSet; | |
import java.util.ArrayList; | |
import java.lang.ref.WeakReference; | |
import clojure.java.api.Clojure; | |
import clojure.lang.IFn; | |
import clojure.lang.IRef; | |
import clojure.lang.ISeq; |
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
(ns hoplonfx.ui | |
(:require | |
[clojure.data :as data] | |
[hoplonfx.util :refer :all] | |
[hoplonfx.cell :as c :refer [cell? formula]] | |
[camel-snake-kebab.core :refer [->camelCaseString]] | |
[hoplonfx.codegen :refer [define-javafx-methods | |
define-javafx-constructors]]) | |
(:import | |
[javafx.event EventHandler] |
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
(ns hoplonfx.codegen | |
(:import | |
[java.lang.reflect Modifier]) | |
(:require | |
;; Using require/refer below to avoid the runtime dependency. | |
#_[compliment.utils :as compliment] | |
[clojure.set :refer [intersection]] | |
[camel-snake-kebab.core :refer [->kebab-case-string]] | |
[hoplonfx.util :refer [apply-constructor gensyms conxt with-let]])) |
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
(ns hoplonfx.core | |
(:require | |
[hoplonfx.ui :refer [run]] | |
[hoplonfx.util :refer :all]) | |
(:import | |
[hoplonfx ApplicationShim] | |
[javafx.application Application])) | |
(defonce stage | |
(delay |
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
(ns hoplonfx.core | |
(:require | |
[hoplonfx.ui :refer [run]] | |
[hoplonfx.util :refer :all]) | |
(:import | |
[hoplonfx ApplicationShim] | |
[javafx.application Application])) | |
(defonce stage | |
(delay |
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
(ns fjorm.http | |
(:require | |
[cheshire.core :as json])) | |
(defmacro with-open-> [stream & body] | |
`(with-open [stream# ~stream] | |
(-> stream# ~@(map #(if (seq? %) % (list %)) body)))) | |
(defn post-json [url json] | |
(let [bytes (.getBytes (json/generate-string json))] |
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
#!/usr/bin/env bash | |
abort() { exec 1>&2 ; [[ $1 ]] && echo "$(basename $0): $1" ; exit 1 ; } | |
usage() { | |
local prog=$(basename $0) | |
exec 1>&2 | |
[[ $1 ]] && echo "$prog: $1" && echo | |
cat <<EOT | |
USAGE: |
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
from mitmproxy import http | |
from mitmproxy import ctx | |
import sys | |
import re | |
from urllib.request import Request, urlopen | |
from urllib.parse import urlparse, urlunparse, parse_qsl, urlencode | |
class ProxyImpl: | |
def __init__(self, config): | |
self.config = config |
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
(ns dnd.core | |
(:require | |
[hoplon.core :as h :refer [defelem on!]] | |
[javelin.core :as j :refer [with-let cell cell= deref*]])) | |
(declare end!) | |
(defn start! | |
"Start dragging the item at position <pos>." | |
[this pos] |