Skip to content

Instantly share code, notes, and snippets.

View achikin's full-sized avatar

Anton Chikin achikin

  • Russia, Voronezh
View GitHub Profile
@achikin
achikin / sub_watch.cljs
Created March 6, 2018 11:30
Test of subscription watchers
(ns whatever.sub-test
(:require [reagent.core :as r]
[reagent.ratom :as ratom]
[re-frame.core :as rf]))
(rf/reg-sub :test (fn [db] (:test db)))
(rf/reg-event-db :set-test (fn [db [_ newval]] (assoc db :test newval)))
(rf/reg-event-db :set-test-changed (fn [db [_ newval]] (assoc db :test-changed newval)))
(rf/reg-sub :test-changed (fn [db _] (:test-changed db)))
;; -*- mode: emacs-lisp -*-
;; This file is loaded by Spacemacs at startup.
;; It must be stored in your home directory.
(defun dotspacemacs/layers ()
"Configuration Layers declaration.
You should not put any user code in this function besides modifying the variable
values."
(setq-default
;; Base distribution to use. This is a layer contained in the directory
;; `+distribution'. For now available distributions are `spacemacs-base'
@achikin
achikin / assignment.md
Last active October 5, 2022 13:51
Test assignment

Given social network posts in the following format:

[
 {"date": "12.10.2019",
  "text": "I love trouts!",
  "likes": [1, 2, 3, 4]},
  
  {"date": "17.10.2019",
  "text": "Hello world!",
 "likes": [1, 2, 3, 4]}б
decomp.core=> (defn xxx [a b] (+ a b))
#'decomp.core/xxx
decomp.core=> (dc/decompile (fn [] (xxx 1 2)))
// Decompiling class: decomp/core$fn__1632
package decomp;
import clojure.lang.*;
public final class core$fn__1632 extends AFunction
@achikin
achikin / test.log
Created March 6, 2020 21:53
reagent master test run log
~/src/reagent (merge-props-fix) → ./run-tests.sh
##
## TESTING browser-cljsjs
##
+ rm -rf target/cljsbuild/test/
+ lein doo chrome-headless test once
;; ======================================================================
;; Testing with Chrome-headless:
@achikin
achikin / keybase.md
Created May 8, 2020 02:29
keybase.md

Keybase proof

I hereby claim:

  • I am achikin on github.
  • I am achikin (https://keybase.io/achikin) on keybase.
  • I have a public key whose fingerprint is B002 7CD2 7BBB A3A6 2AE2 B096 90B1 09AF 65F5 F54B

To claim this, I am signing this object:

@achikin
achikin / ast-example.rb
Last active December 15, 2020 11:23
Ruby AST
def somefn(x, y)
x + y
end
somefn(1,2)