start new:
tmux
start new with session name:
tmux new -s myname
;; Inspired by George Jahad's version: http://georgejahad.com/clojure/debug-repl.html | |
(defmacro local-bindings | |
"Produces a map of the names of local bindings to their values." | |
[] | |
(let [symbols (map key @clojure.lang.Compiler/LOCAL_ENV)] | |
(zipmap (map (fn [sym] `(quote ~sym)) symbols) symbols))) | |
(declare *locals*) | |
(defn eval-with-locals |
; Quick miniKanren-like code | |
; | |
; written at the meeting of a Functional Programming Group | |
; (Toukyou/Shibuya, Apr 29, 2006), as a quick illustration of logic | |
; programming. The code is really quite trivial and unsophisticated: | |
; it was written without any preparation whatsoever. The present file | |
; adds comments and makes minor adjustments. | |
; | |
; $Id: sokuza-kanren.scm,v 1.1 2006/05/10 23:12:41 oleg Exp oleg $ |
I've been using a lot of Ansible lately and while almost everything has been great, finding a clean way to implement ansible-vault wasn't immediately apparent.
What I decided on was the following: put your secret information into a vars
file, reference that vars
file from your task
, and encrypt the whole vars
file using ansible-vault encrypt
.
Let's use an example: You're writing an Ansible role and want to encrypt the spoiler for the movie Aliens.
Inspired by "Parsing CSS with Parsec".
Just quick notes and code that you can play with in REPL.
By @kachayev
(comment ; Fun with transducers, v2 | |
;; Still haven't found a brief + approachable overview of Clojure 1.7's new | |
;; transducers in the particular way I would have preferred myself - so here goes: | |
;;;; Definitions | |
;; Looking at the `reduce` docstring, we can define a 'reducing-fn' as: | |
(fn reducing-fn ([]) ([accumulation next-input])) -> new-accumulation | |
;; (The `[]` arity is actually optional; it's only used when calling | |
;; `reduce` w/o an init-accumulator). |
;; Clojure | |
(require 'clojure-mode) | |
(setq auto-mode-alist (cons '("\\.cljs$" . clojure-mode) auto-mode-alist)) | |
(setq inferior-lisp-program "lein repl") | |
;; clj-refactor | |
(require 'clj-refactor) | |
(add-hook 'clojure-mode-hook (lambda () | |
(clj-refactor-mode 1) | |
(cljr-add-keybindings-with-prefix "C-c C-o"))) |
(:identity req)
is auth backend independent way to access user data:current-user
doesn't imply that authentication is required, route should also have :auth-rules
if authentication is required(ns ukanren-transducers | |
(:refer-clojure :exclude [== disj conj])) | |
(defrecord Lvar [name]) | |
(defn lvar [] (->Lvar (gensym "lvar"))) | |
(defn lvar? [v] (instance? Lvar v)) | |
(def empty-state {}) | |
(defn walk [u s] |
(ns upload-file.core | |
(:require [reagent.core :refer [render atom]] | |
[cljs.core.async :refer [put! chan <! >!]]) | |
(:require-macros [cljs.core.async.macros :refer [go go-loop]])) | |
;; derived from https://mrmcc3.github.io/post/csv-with-clojurescript/ | |
;; and based on reagent-frontend template. | |
;; dependencies from project.clj in addition to clojure, clojurescript, and reagent: | |
;; [org.clojure/core.async "0.2.395"] |