подключаемся к серверу и ставим Ansible
sudo apt-add-repository ppa:ansible/ansible
sudo apt-get update
sudo apt-get install ansible
| "WTF IS \033[30;47m???", a practical cheat-sheet | |
| Font color definitions can be intimidating and nonsense at first, | |
| but it is quite easy, lets just follow character by character: | |
| ┌────────┤\033├── Escape character (ESC) | |
| │┌───────┤ [ ├── Define a sequence (many characters in a code) | |
| ││ | |
| ││┌──────┤ X ├── Parameter (optional) ┐ | |
| │││┌─────┤ ; ├── Parameter separator │ SGR Code |
| --- | |
| - Адыгея: | |
| - Абадзехская | |
| - Адамий | |
| - Адыгейск | |
| - Новая Адыгея | |
| - Нижний Айрюм | |
| - Апостолиди | |
| - Ассоколай | |
| - Кармир-Астх |
TL;DR
Install Postgres 9.5, and then:
sudo pg_dropcluster 9.5 main --stop
sudo pg_upgradecluster 9.3 main
sudo pg_dropcluster 9.3 mainThis gist is the source code for http://gary.beagledreams.com/page/go-websocket-chat.html
Copyright (c) 2013 Gary Burd
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
| ["C000000016939", "C000000016941", "C000000016947", "C000000016944", "C000000016948", "B000000002206", "B000000002208", "B000000002207", "B000000001939", "C000000061426", "C000000061423", "C000000061422", "C000000061420", "C000000061417", "C000000061430", "C000000061416", "C000000061427", "C000000048155", "C000000048161", "C000000048163", "C000000048153", "C000000048151", "C000000048159", "C000000048157", "C000000048144", "C000000048148", "C000000048146", "C000000049203", "C000000049202", "C000000049190", "C000000049204", "C000000049201", "C000000049200", "B000000014014", "C000000049220", "C000000049221", "C000000049219", "C000000042065", "C000000042046", "C000000042059", "C000000042067", "C000000042064", "C000000042063", "C000000042061", "C000000042062", "C000000042060", "C000000042057", "C000000042056", "C000000042053", "C000000042055", "C000000042054", "C000000042051", "C000000042052", "C000000042050", "C000000042048", "C000000042047", "C000000042049", "C000000042045", "C000000042043", "C000000042068", "C0 |
| DELETE | |
| FROM rendered_pages rp | |
| USING rendered_pages orp | |
| WHERE | |
| orp.book_id = rp.book_id | |
| AND orp.number = rp.number | |
| AND orp.created_at < rp.created_at |
| package controllers | |
| import play.Logger | |
| import play.api._ | |
| import play.api.mvc._ | |
| import play.api.libs.iteratee._ | |
| object Application extends Controller { | |
| val (eventEnumerator, eventChannel) = Concurrent.broadcast[String] |
| val (chatEnumerator, chatChannel) = Concurrent.broadcast[String] | |
| val chatClient1 = Iteratee.foreach[String](m => println("Client 1: " + m)) | |
| val chatClient2 = Iteratee.foreach[String](m => println("Client 2: " + m)) | |
| chatEnumerator |>>> chatClient1 | |
| chatEnumerator |>>> chatClient2 | |
| chatChannel.push(Message("Hello world!")) |