For example, to override the AppBar (https://material-ui-next.com/api/app-bar/) root class we can do the following:
1 - Add the property classes in the AppBar component:
<AppBar classes={{root: 'my-root-class'}}
(ns my-shadow-app.dev-server | |
(:require [clj-http.client :as client] | |
[clojure.string :as string] | |
[shadow.http.push-state :as push-state]) | |
(:import [org.apache.http NoHttpResponseException])) | |
(defn handler | |
[{:keys [uri http-config body headers request-method] :as request}] | |
(if-not (string/starts-with? uri "/api") | |
(push-state/handle request) |
For example, to override the AppBar (https://material-ui-next.com/api/app-bar/) root class we can do the following:
1 - Add the property classes in the AppBar component:
<AppBar classes={{root: 'my-root-class'}}
(defn -main | |
[& args] | |
(let [file (try-> args | |
parse-args | |
(:! clojure.lang.ExceptionInfo ei (fe/print-other-exception ei)) | |
:filename)] | |
(when (and file (not= ::try/exit file)) | |
(try-> file | |
fern/load-from-file | |
(:! java.io.FileNotFoundException fnfe (fe/print-error-message (str "File not found: " (pr-str (.getMessage fnfe))))) |
% use like ?DEBUG_CALL({simple_test, Status, get_value(X)}). | |
% or even 2 = ?DEBUG_CALL(if true -> 1+1 end). | |
-define(DEBUG_CALL(Args), (fun() -> DEBUG_CALL = (Args), error_logger:info_msg("~w:~w -> ~s:~n ~150p~n", [?MODULE, ?LINE, ??Args, DEBUG_CALL]), DEBUG_CALL end)()). |
(page "index.html" | |
(:require [ajax.core :refer [GET POST]])) | |
(def url "http://127.0.0.1:4567/currencies") | |
(def currencies (cell [])) | |
(def from (cell "USD")) | |
(def to (cell "USD")) | |
(def result (cell nil)) | |
(GET url |
# ------------------------------------------------------------------------------ | |
# tlp - Parameters for power saving | |
# See full explanation: http://linrunner.de/en/tlp/docs/tlp-configuration.html | |
# dir: /etc/default/tlp | |
# Hint: some features are disabled by default, remove the leading # to enable | |
# them. | |
# Set to 0 to disable, 1 to enable TLP. |
(ns myapi.interceptors) | |
(def user-auth | |
{:before (fn [context] | |
(update-in context :password h/encrypt-password)) | |
:after (fn [context] | |
(dissoc context [:password]))}) | |
(def interceptors [user-auth]) |
version: 2 | |
jobs: | |
build: | |
docker: | |
- image: circleci/clojure:lein-2.7.1 | |
environment: | |
- CC_TEST_REPORTER_ID=....set in project settings.... | |
steps: |
-module(timetop). | |
-export([top/2]). | |
top(Duration, Count) -> | |
OldPrio = erlang:process_flag(priority, high), | |
Result = scheduled_time_top(Duration), | |
erlang:process_flag(priority, OldPrio), | |
lists:sublist(Result, Count). |