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)()). |
# ------------------------------------------------------------------------------ | |
# 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. |
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). |
-module(twitter_stream). | |
-author("gdamjan@gmail.com"). | |
%% Depends on: | |
%% ibrowse for http | |
%% couchbeam for couchbeam_json_stream (a fork of damienkatz json_stream_parse) | |
%% mochiweb for mochiweb_util:urlencode | |
-export([start/0]). |
-module(web_utils). | |
-include ("beehive.hrl"). | |
-include ("http.hrl"). | |
-compile (export_all). | |
% Private | |
convert_to_struct(RawData) -> | |
lists:map(fun({BinKey, BinVal}) -> | |
Key = misc_utils:to_atom(BinKey), | |
Val = misc_utils:to_list(BinVal), |