Мало того, что управление зависимостями в Rails то еще занятие, но упражнение по сборке бандла под Docker Alpine вообще за границами добра и зла. не libmysql-dev, блеать, а libmariadb-dev. и так далее
Сообщения
Сообщения за 2017
Это пять!
- Получить ссылку
- X
- Электронная почта
- Другие приложения
А-а-а! "There is a gem for exevrything" rails mantra seems to be true! I've a problem assets precompilation in docker environment, and here is solution! Null DB Active record driver. Awesome! Meet the gem, that solves the problem, which should not exist at all! http://blog.zeit.io/use-a-fake-db-adapter-to-play-nice-with-rails-assets-precompilation/
- Получить ссылку
- X
- Электронная почта
- Другие приложения
what to do, when clojure map contains reserved kewords, like :@number? it's ok, in code you can use (keyword "@number") and be happy with that, but what to do to serialize map, or, when you need it as sample data for tests? in that case you can use clojure.walk (clojure.walk/stringify-keys m) and after that (clojure.walk/keywordize-keys m)
clojurescript and google closure compiler
- Получить ссылку
- X
- Электронная почта
- Другие приложения
I've just discovered joy of the Google Closure compiler, just when I've turned on warnings on infer when I started to get awkward errors upon javascript execution on minified CLJS. First, I've changed all (.-prop entity) to (goog.obj/get entity "prop") (.. % -target -value) to (goog.obj/getValuesByKey entity "target" "value") which is, as for me is more concise and crisp. Then, Delay class is much more clear and convenient then setInterval function. (.FileReader reader) was replaced by (goog.fs/FileReader.). "onload" event handler has been replaced by (.listen reader goog.fs/FileReader.EventType.LOAD_END) So, my code become much more clean and maintainable.
how to switch figwheel build for emacs cider
- Получить ссылку
- X
- Электронная почта
- Другие приложения
clojurescript externs
- Получить ссылку
- X
- Электронная почта
- Другие приложения
Someday you try integration with other APIs, and ... here is a list of useful externs Most popular Google and Facebook externs http://closureplease.com/externs/ Firebase https://raw.githubusercontent.com/isabo/firebase-externs/master/firebase-externs.js And here is script for externs generation http://jmmk.github.io/javascript-externs-generator/
layout for material-ui clojurescript
- Получить ссылку
- X
- Электронная почта
- Другие приложения
Bug with Figwheel Client Version 0.5.8 is not equal to Figwheel Sidecar Version 0.5.9.
- Получить ссылку
- X
- Электронная почта
- Другие приложения
ClojureScript lifehacks
- Получить ссылку
- X
- Электронная почта
- Другие приложения
After ClojureScript Hackaton I've discovered several interesting tips. 1. Bug with loosing focus on input is due to nil value for string. In case you supply "" instead of nil bug dissapears. 2. Sometimes with RUM when you use for to loop through react components you should use with-keys 3. Nice desctructure for RUM when use local atoms can be done without let, right in parameters! Pushy and Bide are right choice for routing!
New atom plugin for Clojure editing
- Получить ссылку
- X
- Электронная почта
- Другие приложения
Using bower with clojurescript
- Получить ссылку
- X
- Электронная почта
- Другие приложения
Tricks for namespaced and weird keywords
- Получить ссылку
- X
- Электронная почта
- Другие приложения
# :person { :first "Han" :last "Solo" :ship #:ship{ :name "Millenium Falcon" :model "YT-1300f light freighter" }} is read as: { :person/first "Han" :person/last "Solo" :person/ship { :ship/name "Millenium Falcon" :ship/model "YT-1300f light freighter" }} Also you can use this syntax (keyword :counters :fb) -> :counters/fb And to use spatial characters like :last_insert_rowid() from return value of Korma insert sql statement, I've found that way (keyword "last_insert_rowid()") -> :last_insert_rowid()
My Datascript tips and tricks
- Получить ссылку
- X
- Электронная почта
- Другие приложения
Sometimes you're using something like root structure with entity-id 0, that's convenient to do some routing and stuff like that I used to query this attrs like this (let [edit? (first (d/q '[:find [?v] :where [0 :person/edit ?v]] @conn))]] edit?) But it's much better to use is like this via entity (let [edit? (:person/edit (d/entity @conn 0))] edit?)