start new:
tmux
start new with session name:
tmux new -s myname
| class A | |
| class A2 extends A | |
| class B | |
| trait M[X] | |
| // | |
| // Upper Type Bound | |
| // | |
| def upperTypeBound[AA <: A](x: AA): A = x |
| import java.util.Date | |
| import akka.actor.Actor | |
| import akka.actor.ActorSystem | |
| import akka.actor.Props | |
| import akka.actor.ReceiveTimeout | |
| import akka.util.duration._ | |
| class MyActor extends Actor { | |
| context.setReceiveTimeout(5 seconds) |
| Variables | |
| ========== | |
| predefined variables : | |
| - inventory_hostname (fqdn) (normally the same as ansible.fqdn) | |
| - inventory_hostname_short | |
| To know the return codes returned by ansible modules, just use plain ansible -vvv to see them : | |
| ansible -i ~/ansible/arrfab.net/hosts/hosts.cfg -vvv -m copy -a 'src=files/sysinfo dest=/etc/sysinfo' tungstene.arrfab.net | |
| tungstene.arrfab.net | success >> { | |
| "changed": true, |
| package controllers | |
| import play.api._ | |
| import play.api.data._ | |
| import play.api.data.Forms._ | |
| import play.api.mvc._ | |
| object Application extends Controller { | |
| val form = Form( |
| (defun right-arrow () | |
| (interactive) | |
| (cond ((looking-back "=") | |
| (backward-delete-char 1) (insert "⇒")) | |
| ((looking-back "-") | |
| (backward-delete-char 1) (insert "→")) | |
| (t (insert ">")))) | |
| (defun left-arrow () | |
| (interactive) |
| ;; .emacs | |
| ;;; uncomment this line to disable loading of "default.el" at startup | |
| ;; (setq inhibit-default-init t) | |
| ;; enable visual feedback on selections | |
| (setq transient-mark-mode t) | |
| ;; default to better frame titles | |
| (setq frame-title-format |
| ## One line per log entry with merge graph | |
| ## (--decorate is implicit for newer git versions?): | |
| #git log --graph --oneline --decorate | |
| ## | | |
| ## Add --branches --remotes --tags --merges to see entries for all of the | |
| ## corresponding refs, not only commits (--all for all refs). | |
| ## Format output with --pretty=tformat:'<format>' | |
| ## Interesting placeholders for oneline <format>: |
The basic structure of a React+Flux application (see other examples)
- /src/actions/AppActions.js - Action creators (Flux)
- /src/components/Application.js - The top-level React component
- /src/constants/ActionTypes.js - Action types (Flux)
- /src/core/Dispatcher.js - Dispatcher (Flux)
- /src/stores/AppStore.js - The main store (Flux)
| // Тайпкласс Animal (для полноты картины добавил метод hello, иначе был бы совсем тривиальный пример) | |
| // Animal полностью абстрагирован от низлежашего типа A | |
| trait Animal[A] { | |
| def word: String | |
| def talk() { println(word) } | |
| def hello(a: A): String | |
| } | |
| // Обертка над тайпклассом Animal, чтобы можно было писать cat.hello, а не animal.hello(cat) | |
| // AnimalOps полностью дублирует методы, определённые в Animal, но также может содержать еще и дополнительные методы. |