tree
.
├── build.gradle
├── gradle
│ └── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
#!/bin/bash | |
function vagrant_get_status() | |
{ | |
cd "$1" | |
local status_op=$(vagrant status --machine-readable) | |
echo "$status_op" | while read line | |
do | |
local status_line=(${line//,/ }) | |
local vagrant_type=${status_line[2]} |
(defun aj-toggle-fold () | |
"Toggle fold all lines larger than indentation on current line" | |
(interactive) | |
(let ((col 1)) | |
(save-excursion | |
(back-to-indentation) | |
(setq col (+ 1 (current-column))) | |
(set-selective-display | |
(if selective-display nil (or col 1)))))) | |
(global-set-key [(M C i)] 'aj-toggle-fold) |
(def ptrn | |
{ | |
:a {:pattern #"a(?!b)" | |
:purpose "Only allow a if it is not preceded by a 'b' (negative lookahead)" | |
:samples ["acdefg" ; ok | |
"abcdef" ; nil | |
]} | |
:b {:pattern #"(?i)(<title.*?>)(.+?)(</title>)" |
(require 'org) | |
(defun org-pinboard-store-link () | |
"Store a link taken from a pinboard buffer." | |
(when (eq major-mode 'pinboard-mode) | |
(pinboard-with-current-pin pin | |
(org-store-link-props | |
:type "pinboard" | |
:link (alist-get 'href pin) | |
:description (alist-get 'description pin))))) |
A minimal example of creating a (mostly) working FUSE filesystem using Clojure. NOTE: I have only tested this with OSX, and it assumes you have already installed libfuse.
Create an empty directory at /tmp/meld
to serve as your mount point,
put these files in a directory called meld
, then:
Since it has come up a few times, I thought I’d write up some of the basic ideas around domain modeling in Clojure, and how they relate to keyword names and Specs. Firmly grasping these concepts will help us all write code that is simpler, cleaner, and easier to understand.
Clojure is a data-oriented language: we’re all familiar with maps, vectors, sets, keywords, etc. However, while data is good, not all data is equally good. It’s still possible to write “bad” data in Clojure.
“Good” data is well defined and easy to read; there is never any ambiguity about what a given data structure represents. Messy data has inconsistent structure, and overloaded keys that can mean different things in different contexts. Good data represents domain entities and a logical model; bad data represents whatever was convenient for the programmer at a given moment. Good data stands on its own, and can be reasoned about without any other knowledge of the codebase; bad data is deeply and tightly coupled to specific generating and
(ns hello-world.pg | |
(:require | |
[clojure.string :as string] | |
[cljs.nodejs :as nodejs] | |
[cljs.core.async | |
:refer [<! chan put! close! onto-chan to-chan]] | |
[taoensso.timbre :as timbre | |
:refer-macros [tracef debugf infof warnf errorf]]) | |
(:require-macros | |
[cljs.core.async.macros :as m :refer [go]])) |
;;; package --- Fix permissions for Emacs.app on macOS Catalina | |
;;; Author: Artem Loenko | |
;;; Mail-To: <artyom.loenko@mac.com> | |
;;; Commentary: | |
;;; Code: | |
(defconst _default-emacs-app-plist-path "/Applications/Emacs.app/Contents/Info.plist") | |
(defconst _temp-buffer-name "*fixing Emacs permissions*") | |
(defconst _temp-buffer (get-buffer-create _temp-buffer-name)) | |
(with-current-buffer _temp-buffer (erase-buffer)) |
- Measure time spend on index, flush, refresh, merge, query, etc. (TD - done)
- Take hot threads snapshots under read+write, read-only, write-only (TD - done)
- Adjust refresh time to 10s (from 1s) and see how load changes (TD)
- Measure time of a rolling restart doing
disable_flush
anddisable_recovery
(TD) - Specify routing on query -- make it choose same node for each shard each time (MD)
- GC new generation size (TD)
- Warmers
- measure before/after of client query time with and without warmers (MD)