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
| ;; input lines are like: | |
| ;; fs.truncate(path, len, callback) | |
| ;; fs.truncateSync(path, len) | |
| ;; fs.chown(path, uid, gid, callback) | |
| ;; fs.chownSync(path, uid, gid) | |
| ;; which are converted to: | |
| ;; (def ftruncate (core/clojureify fs.ftruncate)) | |
| ;; (def ftruncate-sync (core/clojureify-sync fs.ftruncateSync)) | |
| ;; ... |
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
| (defn- -single-line-input [value on-key placeholder] | |
| (fn [value on-key placeholder] | |
| [:input.form-control.input-lg {:type "text" | |
| :value @value | |
| :on-key-down on-key | |
| :on-change #(reset! value (.. % -target -value)) | |
| :placeholder placeholder | |
| :autoFocus true}])) | |
| (defn- single-line-input [value on-key placeholder] |
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 karmalack.server | |
| (:require [karmalack.config :refer [slack-conn-config dev?]] | |
| [karmalack.db :as db] | |
| [compojure.core :refer :all] | |
| [liberator.core :refer [defresource resource]] | |
| [clj-slack.core :as slack] | |
| [org.httpkit.server :refer [run-server]] | |
| [com.stuartsierra.component :as component] | |
| [ring.middleware.cors :refer [wrap-cors]] | |
| [ring.middleware.reload :refer [wrap-reload]] |
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
| #!/bin/sh | |
| lessc resources/less/lurch.main.less resources/public/css/lurch.css |
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
| ;; such emacs init | |
| ;; | |
| (require 'package) | |
| (add-to-list 'package-archives | |
| '("melpa" . "https://melpa.org/packages/") t) | |
| (when (< emacs-major-version 24) | |
| ;; For important compatibility libraries like cl-lib |
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 dt.core | |
| (:require [datascript.core :as d])) | |
| ;; schema so nice | |
| (def schema {:car/maker {:db/type :db.type/ref} | |
| :car/colors {:db/cardinality :db.cardinality/many}}) | |
| ;; create the connection | |
| (def conn (d/create-conn schema)) |
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 dt.core | |
| (:require [datascript.core :as d])) | |
| ;; schema so nice | |
| (def schema {:maker/email {:db/unique :db.unique/identity} | |
| :car/model {:db/unique :db.unique/identity} | |
| :car/maker {:db/type :db.type/ref} | |
| :car/colors {:db/cardinality :db.cardinality/many}}) |
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
| ;; iterate over a single collection | |
| (for [x (range 5)] | |
| (* x 2)) | |
| ;; iterate over multiple collections | |
| (for [x (range 5) | |
| y (range 5)] | |
| [x y]) | |
| ;; conditional skip certain values |
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
| // gencarol.c | |
| // generate carol set | |
| // | |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <sys/stat.h> | |
| #include <errno.h> | |
| #include <time.h> |
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
| Section "Monitor" | |
| Identifier "Monitor0" | |
| VendorName "Shimian" | |
| ModelName "QHD270" | |
| HorizSync 88.8 | |
| VertRefresh 59.5 | |
| Option "DPMS" | |
| Modeline "2560x1440" 241.50 2560 2608 2640 2720 1440 1443 1448 1481 +hsync -vsync | |
| DisplaySize 597 336 | |
| EndSection |