Initial public

Some content was deleted before this project
has been moved to public
This commit is contained in:
Denis Zheleztsov 2021-10-18 19:45:57 +03:00
commit a5dd73f274
131 changed files with 3045 additions and 0 deletions

231
LICENSE Normal file
View File

@ -0,0 +1,231 @@
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright © 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for software and other kinds of works.
The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too.
When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights.
Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions.
Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and modification follow.
TERMS AND CONDITIONS
0. Definitions.
“This License” refers to version 3 of the GNU General Public License.
“Copyright” also means copyright-like laws that apply to other kinds of works, such as semiconductor masks.
“The Program” refers to any copyrightable work licensed under this License. Each licensee is addressed as “you”. “Licensees” and “recipients” may be individuals or organizations.
To “modify” a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a “modified version” of the earlier work or a work “based on” the earlier work.
A “covered work” means either the unmodified Program or a work based on the Program.
To “propagate” a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well.
To “convey” a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays “Appropriate Legal Notices” to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion.
1. Source Code.
The “source code” for a work means the preferred form of the work for making modifications to it. “Object code” means any non-source form of a work.
A “Standard Interface” means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language.
The “System Libraries” of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A “Major Component”, in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it.
The “Corresponding Source” for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work.
The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source.
The Corresponding Source for a work in source code form is that same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures.
When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified it, and giving a relevant date.
b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to “keep intact all notices”.
c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so.
A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an “aggregate” if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways:
a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b.
d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d.
A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work.
A “User Product” is either (1) a “consumer product”, which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, “normally used” refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product.
“Installation Information” for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made.
If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM).
The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying.
7. Additional Terms.
“Additional permissions” are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or authors of the material; or
e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors.
All other non-permissive additional terms are considered “further restrictions” within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11).
However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice.
Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License.
An “entity transaction” is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it.
11. Patents.
A “contributor” is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's “contributor version”.
A contributor's “essential patent claims” are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, “control” includes the right to grant patent sublicenses in a manner consistent with the requirements of this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version.
In the following three paragraphs, a “patent license” is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To “grant” such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party.
If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. “Knowingly relying” means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it.
A patent license is “discriminatory” if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License “or any later version” applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation.
If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program.
Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the “copyright” line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode:
<program> Copyright (C) <year> <name of author>
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an “about box”.
You should also get your employer (if you work as a programmer) or school, if any, to sign a “copyright disclaimer” for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see <http://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read <http://www.gnu.org/philosophy/why-not-lgpl.html>.

9
README.md Normal file
View File

@ -0,0 +1,9 @@
# blog
## How to build
You needs an old Hugo version 0.21.
```
./hugo --baseURL "https://difrex.lessmore.pw/" --themesDir ./themes -t slim
```

10
config.toml Normal file
View File

@ -0,0 +1,10 @@
baseURL = "http://difrex.lessmore.pw/"
languageCode = "ru-RU"
title = "difrex | more"
[params]
github = "Difrex"
email = "difrex@lessmore.pw"
content = false
summary = true
FooterMsg = "difrex@lessmore.pw 2017 CC-by-NC 4.0"

View File

@ -0,0 +1,114 @@
+++
date = "2017-12-12T00:58:13+03:00"
draft = false
title = "API поиска на dynamic.lessmore.pw"
tags = ["elasticsearch", "idec"]
+++
## Поиск на dynamic.lessmore.pw
Как это ваще устроено??? На самом деле [API](https://dynamic.lessmore.pw/search) -- это открытый всем Elasticsearch, который предоставляет
гору возможностей для поиска за счет движка Lucene. Давайте что-нибудь найдем!
Вот в [этом](ii://XWShDDcuR4C8PcrTFdGl) вот комменте я пообещал рассказать как это все сделать. Приступим.
Давайте для начала попробуем поискать этот самый коммент: ii://XWShDDcuR4C8PcrTFdGl. Здесь и далее мы будем использовать только
*curl*.
``` sh
curl -XPOST -d '{"query": {"query_string" : {"fields" : ["msgid"], "query" :"XWShDDcuR4C8PcrTFdGl"}}}' https://dynamic.lessmore.pw/search
```
Нам вернется такой вот ответ
``` json
{
"took": 2,
"timed_out": false,
"_shards": {
"total": 5,
"successful": 5,
"skipped": 0,
"failed": 0
},
"hits": {
"total": 1,
"max_score": 8.316952,
"hits": [
{
"_index": "idec_net",
"_type": "post",
"_id": "XWShDDcuR4C8PcrTFdGl",
"_score": 8.316952,
"_source": {
"echo": "idec.talks",
"subg": "Re: Совет нодов",
"to": "Peter",
"author": "Difrex(mobile)",
"message": "\nПостараюсь завтра написать пост с обзором в ii://develop.16. Ну, и ссылку в этот тред скину.",
"date": "1513020107",
"msgid": "XWShDDcuR4C8PcrTFdGl",
"tags": "",
"repto": "h97Frgqdtapl4AI11aUj",
"address": "tavern,23"
}
}
]
}
}
```
Вот и он!
Нам вернулось одно сообщение, что не удивительно, т.к. ID в сети уникальны, а мы искали именно по нему.
А теперь давайте выведем все последние(5) сообщения(по дате) из эхи *idec.talks*:
``` sh
curl -XPOST -d '{"sort": [{"date": {"order": "desc"}}, {"_score": {"order": "desc" }}], "size": 5}' https://dynamic.lessmore.pw/search -H 'Content-type: application/json'
{
"took": 2,
"timed_out": false,
"_shards": {
"total": 5,
"successful": 5,
"skipped": 0,
"failed": 0
}
...
```
Смотрите, тут мы отсортировали(на стороне сервера) сообщения по дате в порядке убывания и ограничили лимит в 5 сообщений.
Попробуйте перевести это на SQL(```select * from idec.talks order by date desc limit 5```).
А теперь выполним более сложный поиск: мы найдем сообщения по строке! Т.е. выполним полнотекстовый поиск!
Запрос будет выглядеть так:
``` json
{
"sort": [
{
"date": {
"order": "desc"
}
},
{
"_score": {
"order": "desc"
}
}
],
"query": {
"simple_query_string": {
"query": "обзор"
}
},
"size": 5
}
```
Отправляем его POST-ом в https://dynamic.lessmore.pw/search.
В ответ нам на это вернется список из 5 сообщений отсортированных по дате, где найдены вхождения слова "обзор".
Кстати, верхнее сообщение(b2rhH6sOfzEzgGZzLT51(на данный момент)) из эхи habra.16 и с заголовком
"Обзор литературы по языку Python для начинающих".
Вот так вот. Чтобы делать более лучшие вещи читайте документацию(query DSL) по Elasticsearch.
// Да, если вашей эхи нет в индексе, то убедитесь, что она есть в list.txt

View File

@ -0,0 +1,237 @@
+++
date = "2018-11-27T11:22:39+03:00"
draft = false
title = "Ограничиваем в правах Firefox с помощью apparmor"
tags = ["linux", "firefox", "apparmor", "archlinux"]
comments = true
+++
>AppArmor — программный инструмент упреждающей защиты, основанный на политиках безопасности, которые определяют,
>к каким системным ресурсам и с какими привилегиями может получить доступ то или иное приложение.
>В AppArmor включён набор стандартных профилей, а также инструменты статического анализа и инструменты, основанные на обучении,
>позволяющие ускорить и упростить построение новых профилей.
*© Wikipedia.org*
Самое опасное приложение на десктопе, как я считаю, -- это браузер. На меня напал очередной приступ паранои и я написал профиль
apparmor для Firefox.
## tl;dr
Ставим утилиты:
```sh
pacman -S apparmor audit
```
Apparmor входит в ядро, так что нужно только его включить передав соответствующие параметры в cmdline Linux.
Правим /etc/default/grub:
```
GRUB_CMDLINE_LINUX="apparmor=1 security=apparmor audit=1"
```
Включаем сервисы:
```
systemctl enable apparmor
systemctl enable auditd
```
Разрешаем себе читать audit.log
```
groupadd -r audit
gpasswd -a USERNAME audit
```
В /etc/audit/auditd.conf прописываем только что созданную группу: `log_group = audit`
**Перезагружаемся**
Проверяем статус apparmor:
```
apparmor_status
apparmor module is loaded.
62 profiles are loaded.
49 profiles are in enforce mode.
...
SKIP
...
```
Пишем профиль **/etc/apparmor.d/usr.bin.firefox**
```
#include <tunables/global>
/usr/bin/firefox {
#include <abstractions/base>
#include <abstractions/bash>
# Даем доступ к видео, памяти и tty
/dev/dri/** wr,
/dev/dri/ r,
/dev/shm/ r,
/dev/tty* rw,
/dev/shm/* rw,
# Даем доступ к конфигам, а так же сети и SSL
/etc/fonts/** r,
/etc/drirc r,
/etc/mime.types r,
/etc/pulse/client.conf r,
/etc/nsswitch.conf r,
/etc/ca-certificates/** r,
/etc/resolv.conf r,
/etc/host.conf r,
/etc/ssl/openssl.cnf r,
/etc/hosts r,
/etc/gai.conf r,
/etc/machine-id r,
# Разрешаем исполнение самого себя
# /usr/bin/bash ix,
/usr/bin/firefox rix,
/usr/bin/chrome-gnome-shell rix,
# Разрешаем грепать
/bin/grep ixr,
# Доступ к библиотека на чтение/подключение
/usr/lib/* rm,
/usr/lib/dri/* rm,
/usr/lib/python3.7/** rm,
/usr/lib/firefox/** rixm,
# Доступ к системным FS
/sys/devices/system/cpu/present r,
/proc/** r,
/sys/devices/** r,
/usr/share/hunspell/ r,
/usr/share/fonts/** rwkl,
/usr/share/sounds/** r,
# тут 1000 нужно заменить на id своего юзера
/run/user/1000/** r,
# Разрешаем писать во временную директорию
/tmp/** rwk,
# Даем права на чтение/запись/лок/линкинг
/run/user/1000/** rwkl,
# Разрешаем писать в сокет dbus
/var/run/dbus/system_bus_socket w,
# Шрифты/значки и.т.д
/var/cache/fontconfig/** r,
/var/lib/flatpak/exports/** r,
/usr/share/fonts/ r,
/usr/share/icons/** r,
/usr/share/glib-2.0/** r,
/usr/lib/firefox/** rwkix,
/usr/share/ca-certificates/** r,
/usr/lib/gtk-3.0/** rmk,
/usr/share/applications/kde4/ r,
/usr/share/pixmaps/ r,
/usr/share/icons/ r,
/usr/share/libthai/thbrk.tri r,
/usr/local/share/applications/ r,
/usr/local/share/applications/* r,
/usr/local/share/mime/mime.cache r,
/usr/share/applications/ r,
/usr/share/applications/* r,
/usr/share/gdm/applications/ r,
/usr/share/gdm/applications/* r,
/usr/share/locale-langpack/** r,
/usr/share/gtk-3.0/** r,
/usr/share/mime/** r,
/usr/share/myspell/** r,
/usr/share/themes/** r,
# Назначаем Firefox влядельцем ~/.mozilla и даем ему там все права
# кроме исполнения и подключения библиотек
owner @{HOME}/.mozilla/** rwkl,
@{HOME}/.cache/fontconfig/** r,
@{HOME}/.cache/mozilla/** rwk,
@{HOME}/.cache/thumbnails/** r,
@{HOME}/.config/dconf/* rkw,
@{HOME}/.fonts/ r,
@{HOME}/.local/share/icons/** r,
@{HOME}/.cache/mesa_shader_cache/index rwk,
@{HOME}/.local/lib/python3.7/** rm,
@{HOME}/.config/fcitx/dbus/* r,
@{HOME}/.local/share/recently-used.xbel rk,
# Определяем каталоги в домашней директории куда можно ходить
# Firefox и с какими правами.
# В моем случае браузер не может даже получить список
# каталогов, но может читать в разрешенных местах и писать в ~/Загрузки
@{HOME}/Изображения/ r,
@{HOME}/Документы/ r,
@{HOME}/Загрузки/ r,
@{HOME}/Видео/ r,
@{HOME}/Музыка/ r,
@{HOME}/soft/ r,
@{HOME}/Изображения/** r,
@{HOME}/Документы/** r,
@{HOME}/Музыка/** r,
@{HOME}/Загрузки/** rwk,
@{HOME}/Видео/** r,
@{HOME}/soft/** r,
# Кэши и локальные конфиги
@{HOME}/.local/share/fonts/ r,
@{HOME}/.fonts/** r,
@{HOME}/.ICEauthority r,
@{HOME}/.Xauthority r,
@{HOME}/.adobe/**/ r,
@{HOME}/.config/* r,
@{HOME}/.cache/* wrk,
@{HOME}/.config/gtk-2.0/* r,
@{HOME}/.config/gtk-3.0/* r,
@{HOME}/.fonts.conf r,
@{HOME}/.icons/ r,
@{HOME}/.local/share/applications/ r,
@{HOME}/.local/share/applications/* r,
@{HOME}/.local/share/fonts/** r,
@{HOME}/.local/share/icons/ r,
@{HOME}/.local/share/mime/mime.cache r,
@{HOME}/.pulse-cookie krw,
@{HOME}/.config/pulse/** krw,
}
```
**PULL THE LEVER**
```
aa-enforce /etc/apparmor.d/usr.bin.firefox
Назначение /etc/apparmor.d/usr.bin.firefox принудительного режима.
```
Теперь можно запустить браузер и проверить его работоспособность.
Наблюдаем через `tail -f /var/log/audit/audit.log | grep DENIED` что было запрещенно Firefox.
Для меня, например, это:
```text
type=AVC msg=audit(1543307263.804:81037): apparmor="DENIED" operation="open" profile="/usr/bin/firefox" name="/etc/passwd" pid=31159 comm="firefox" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
type=AVC msg=audit(1543307263.884:81039): apparmor="DENIED" operation="exec" profile="/usr/bin/firefox" name="/usr/bin/lsb_release" pid=31177 comm="firefox" requested_mask="x" denied_mask="x" fsuid=1000 ouid=0
type=AVC msg=audit(1543307263.991:81040): apparmor="DENIED" operation="open" profile="/usr/bin/firefox" name="/dev/" pid=31156 comm="firefox" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
type=AVC msg=audit(1543307266.698:81043): apparmor="DENIED" operation="open" profile="/usr/bin/firefox" name="/usr/bin/" pid=31493 comm="chrome-gnome-sh" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
type=AVC msg=audit(1543307266.944:81044): apparmor="DENIED" operation="exec" profile="/usr/bin/firefox" name="/usr/bin/ldconfig" pid=31533 comm="chrome-gnome-sh" requested_mask="x" denied_mask="x" fsuid=1000 ouid=0
type=AVC msg=audit(1543307266.968:81045): apparmor="DENIED" operation="exec" profile="/usr/bin/firefox" name="/usr/bin/gcc" pid=31534 comm="chrome-gnome-sh" requested_mask="x" denied_mask="x" fsuid=1000 ouid=0
```
Зачем браузеру запускать компилятор я категорически не понимаю.
Смотрим еще раз в `apparmor_status`, в конце должно быть что-то подобное:
```text
...
9 processes are in enforce mode.
/usr/lib/firefox/firefox (587) /usr/bin/firefox
/usr/lib/firefox/firefox (3857) /usr/bin/firefox
/usr/lib/firefox/firefox (31156) /usr/bin/firefox
/usr/lib/firefox/firefox (31212) /usr/bin/firefox
/usr/lib/firefox/firefox (31298) /usr/bin/firefox
/usr/bin/python3.7 (31491) /usr/bin/firefox
/usr/lib/firefox/firefox (31516) /usr/bin/firefox
/usr/bin/ntpd (1462) /usr/{bin,sbin}/{,open}ntpd
/usr/bin/dnsmasq (1510) dnsmasq
```
Все довольно просто в отличии от того же SELinux.
А еще у apparmor есть очень хорошая документация с [quick guide](https://gitlab.com/apparmor/apparmor/wikis/QuickProfileLanguage).

60
content/post/eshell.md Normal file
View File

@ -0,0 +1,60 @@
+++
date = "2018-07-26T16:04:27+03:00"
draft = false
title = "eshell в качестве шелла"
tags = ["emacs", "linux"]
comments = true
+++
Я тут подумал: а чей-то я использую в качестве шелла zsh, когда можно юзать емаксовый eshell?
Быстренький гайд.
## Делай раз
Для начала, чтобы темы отображались правильно нужно сгенерировать terminfo.
В 26.1 емаксе можно работать с 24-битным терминалом. Напишем файл terminfo-24.src:
```sh
# Use colon separators.
xterm-24bit|xterm with 24-bit direct color mode,
use=xterm-256color,
setb24=\E[48:2:%p1%{65536}%/%d:%p1%{256}%/%{255}%&%d:%p1%{255}%&%dm,
setf24=\E[38:2:%p1%{65536}%/%d:%p1%{256}%/%{255}%&%d:%p1%{255}%&%dm,
# Use semicolon separators.
xterm-24bits|xterm with 24-bit direct color mode,
use=xterm-256color,
setb24=\E[48;2;%p1%{65536}%/%d;%p1%{256}%/%{255}%&%d;%p1%{255}%&%dm,
setf24=\E[38;2;%p1%{65536}%/%d;%p1%{256}%/%{255}%&%d;%p1%{255}%&%dm,
```
Генерируем:
```sh
tic -x -o ~/.terminfo terminfo-24bit.src
```
Экспортируем переменную окружения:
```sh
export TERM=xterm-24bit
```
Теперь при запуске GNU Emacs в терминале(```emacs[client] -nw```) вместо покореженных цветов при ```TERM=xterm-256color```
![256color](/images/emacs-colors/emacs256.png)
будет красиво
![24bit](/images/emacs-colors/emacs24bit.png)
Это тема *solarized-dark*, кстати.
## Делай два
Но запускать Емакс в терминале при наличии иксов несколько странно. По-этому нужно пускать сразу ```(eshell)```.
В параметрах терминала в качесте комманды прописываем ```/bin/sh -c "export TERM=xterm-24bit; emacsclient -nw -c -e \"(eshell 'N)\""``` и у нас будет сразу пускаться eshell. Неплохо, не правда ли? :)
Либо можно пойти еще дальше и перебиндить стандартнуй комбинацию клавишь на запуск сразу eshell в графическом Emacs.
Так, например, для i3wm: ```bindsym $mod+Return exec emacsclient -c -e "(eshell 'N)"```.
Ура!

View File

@ -0,0 +1,93 @@
+++
date = "2017-05-28T14:04:34+03:00"
draft = false
title = 'Фест Эпоха рыцарства 2017'
comments = true
tags = ["беларусь", "фото", "butterfly temple"]
+++
Будет много фоток. Пост весит 16Мб.
Под Минском в д. Озерцо проходил фестиваль "Эпоха рыцарства" на котором в первый день я и побывал.
Было солнечно и тепло. В палатках продовались домашняя медовуха и сбитень.
Уже на подходе к самому месту проведения заметили палатки и косплееров на коняшках.
[![](/images/folkfest/1.jpg)](/images/folkfest/1.jpg)
Сам фестиваль проходил на территории музея народной архитектуры и быта. Там можно походить и заглянуть в некоторые из домов, где попытались воссоздать
старинный быт. Ничего особо примечательного, но красиво.
[![](/images/folkfest/2.jpg)](/images/folkfest/2.jpg)
Во второй половине дня начался турнир рыцарей. Это там, где они пиками друг-друга тыкают.
Ведущий что-то постоянно рассказывал и комментировал.
[![](/images/folkfest/3.jpg)](/images/folkfest/3.jpg)
Вышли сами рыцари с флагами и на конях.
[![](/images/folkfest/4.jpg)](/images/folkfest/4.jpg)
Вот этот с гусем на голове был особо приколен.
[![](/images/folkfest/5.jpg)](/images/folkfest/5.jpg)
[![](/images/folkfest/6.jpg)](/images/folkfest/6.jpg)
<!-- [![](/images/folkfest/7.jpg)](/images/folkfest/7.jpg) -->
[![](/images/folkfest/8.jpg)](/images/folkfest/8.jpg)
<!-- [![](/images/folkfest/9.jpg)](/images/folkfest/9.jpg) -->
Над этим всем летал дрон и снимал видео. Наверное, его где-то можно будет увидеть.
[![](/images/folkfest/10.jpg)](/images/folkfest/10.jpg)
<!-- [![](/images/folkfest/11.jpg)](/images/folkfest/11.jpg) -->
Рыцари скакали на лошадях и перепрыгивали через препятствие. Весело.
[![](/images/folkfest/12.jpg)](/images/folkfest/12.jpg)
Высоко в небе периодически летали дельтопланы с которых тоже фотографировали фестиваль.
[![](/images/folkfest/13.jpg)](/images/folkfest/13.jpg)
В конце турнира по сценарию рыцари поссорились и между ними начался махач.
[![](/images/folkfest/14.jpg)](/images/folkfest/14.jpg)
[![](/images/folkfest/15.jpg)](/images/folkfest/15.jpg)
За этим наблюдали красивые девочки в средневековых костюмах.
[![](/images/folkfest/16.jpg)](/images/folkfest/16.jpg)
[![](/images/folkfest/17.jpg)](/images/folkfest/17.jpg)
Вечером, на разогреве, выступали фолк-музыканты. Первыми вышли Hardwood.
[![](/images/folkfest/18.jpg)](/images/folkfest/18.jpg)
Играли довольно неплохо, но вот этой графине походу неособо понравилось.
Позади нее на фоне можно увидеть состязание эльфов-лучников.
[![](/images/folkfest/19.jpg)](/images/folkfest/19.jpg)
Следующими выступали Стары Ольса. Подтянулись мужики в смешных шапках. Наверняка гномы.
[![](/images/folkfest/20.jpg)](/images/folkfest/20.jpg)
Выступление проходило весело.
[![](/images/folkfest/21.jpg)](/images/folkfest/21.jpg)
[![](/images/folkfest/22.jpg)](/images/folkfest/22.jpg)
Барабанщики круты!
[![](/images/folkfest/23.jpg)](/images/folkfest/23.jpg)
[![](/images/folkfest/24.jpg)](/images/folkfest/24.jpg)
После Стары Ольса на сцену вышли Butterfly Temple. Пока они чекались сходил за сцену.
Клевые домики.
[![](/images/folkfest/25.jpg)](/images/folkfest/25.jpg)
Средневековые девченки отошли за сцену покурить и початиться.
[![](/images/folkfest/26.jpg)](/images/folkfest/26.jpg)
Наконец-то Butterfly настроились и зарубили МИТОЛ!
[![](/images/folkfest/27.jpg)](/images/folkfest/27.jpg)
[![](/images/folkfest/28.jpg)](/images/folkfest/28.jpg)
[![](/images/folkfest/29.jpg)](/images/folkfest/29.jpg)
Чувак-ведущий залез на столб и пустился в пляс!
[![](/images/folkfest/30.jpg)](/images/folkfest/30.jpg)
[![](/images/folkfest/31.jpg)](/images/folkfest/31.jpg)
Выступление было драйвовым. Играли Butterfly Temple примерно час. На улице стемнело и температура воздуха опустилась всего до 12 градусов тепла.
Комары озверели, в шортах находиться стало не очень круто и мы поехали домой в Минск.

View File

@ -0,0 +1,313 @@
+++
date = "2018-08-21T10:30:12+03:00"
draft = false
title = "Читаем почту в GNU Emacs"
tags = ["emacs", "linux"]
comments = true
+++
И так по обсуждению из вот этого вот [треда](https://dynamic.lessmore.pw/msg/B7Nr84fRN2DxI4mInyuL)(стартовый пост)
у меня получилось настроить Gnus для работы с пятью почтовыми аккаунтами и отказаться от Evolution.
На самом деле связка получилась такая: fetchmail забирает письма, раз в 5 минут и запускает procmail
для фильтрации сообщений, procmail сохраняет сообщения в $MAILDIR, дальше уже Gnus читает почту и показывает
ее. Чтобы иметь нормальные уведомления я использую индексер почты **mu**, i3blocks запускает раз в 30 секунд
скрипт проверки на новые письма и отправляет уведовления через libnotify, ну и иконку на панели рисует.
Вот так примерно это выглядит в ASCII-арте:
```
+-----------+ +------------+ +------------+ +------------+
| fetchmail | |procmail | |Maildir | |Gnus |
| +-----+filters +----+ +----+ |
+----+------+ +------------+ +-----+------+ +------+-----+
| | |
| | |
| | |
| +--------------+ +-----+------+ +-----+-----+
| |i3blocks | |mu indexer | |BBDB |
| |libnotify +----------+ | |contacts |
| +--------------+ +-----+------+ +-----------+
| |
| |
| +-----+------+
+------------------------------+systemd user|
|and timers |
+------------+
```
> <font color="green">Такие cхемки, кстати, очень удобно рисовать в artist-mode</font>
Я настраивал все на Arch Linux, но на самом деле это все заработает в любом GNU Linux.
## Ставим пакеты
Ставим пакеты:
```sh
pacman -S mu fetchmail procmail msmtp
```
Ставим BBDB в Emacs
```
M-x package-install RET bbdb RET
M-x package-install RET all-the-icons-gnus RET
```
BBDB нам нужен для автодополнения контактов в поле To. Да и вообще это хорошая быстрая база контактов
для Emacs.
А вот пакет all-the-icons-gnus рисует красивые иконки :).
## Правим конфиги
### fetchmail
Для начала нам необходимо настроить fetchmail, который будет забирать почту по IMAP/POP.
Редактируем *~/.fetchmailrc*:
```
set daemon 300 # fetch mail every 5 minutes
set logfile ~/Mail/fetchmail.log # Logfile
poll imap.gmail.com with proto IMAP
user 'YOU_USER' there with password 'YOU_PASSWORD'
options ssl keep
mda 'procmail -d %T'
```
Подобным образом определяем все свои аккаунты.
Чтобы не использовать пароли в открытом виде можно наложить [патч](https://jyx.github.io/downloads/patch/fetchmail_gpg.patch) на fetchmail.
### procmail
Для фильтрации почты и расскидывания ее по каталогам будем использовать procmail - у него отличная гибкая
система фильтров на регекспах.
Редактируем *~/.procmailrc*:
```
MAILDIR=$HOME/Mail # You'd better make sure it exists
DEFAULT=$MAILDIR/mbox/
LOGFILE=$MAILDIR/log
LOCKFILE=$HOME/.lockmail
:0 # socials
* ^From.*@.*(twitter|vk\.com|facebook|golos\.io)
social/
:0 # JIRA
* .*Subject.*(\[JIRA\]|\[WGJIRA\]).*
jira/
:0 # Gitlab
* ^From.*gitlab@gitlab.*
Gitlab/
```
Свои фильтры пишем дальше аналогично -- тут все просто. Да, и убедитесь, что каталог ```$MAILDIR```
существует.
### msmtp
**msmtp** эта штука, которая позволяет отправлять письма через нужный сервер smtp. Определяет аккаунт
она по полю From.
Редактируем *~/.msmtprc*:
```
defaults
auth on
tls on
logfile ~/.msmtp.log
tls_certcheck on
tls_trust_file /etc/ssl/cert.pem
account difrex
host smtp.googlemail.com
port 587
from my.mail@gmail.com
user USERNAME
password PASSWORD
```
Аналогично для остальных аккаунтов.
### Systemd
Теперь необходимо написать нужные юниты и таймеры. Юнит для fetchmail будет выглядеть так:
*~/.config/systemd/system/fetchmail.service*
```ini
[Unit]
Description=Fetchmail
After=network-online.target
[Service]
Type=forking
ExecStart=/usr/bin/fetchmail
[Install]
WantedBy=default.target
```
Включаем и запускаем его:
```sh
systemctl --user enable fetchmail.service
systemctl --user start fetchmail.service
```
Теперь fetchmail будет стартовать после успешного логина в систему.
Настроим индексацию почты в mu:
*~/.config/systemd/user/mu.timer*
```ini
[Unit]
Description=mu mail indexer timer
Documentation=man:mu(1)
[Timer]
OnCalendar=*:0/5
[Install]
WantedBy=timers.target
```
И сервис
*~/.config/systemd/system/mu.service*
```ini
[Unit]
Description=mu email indexer
After=fetchmail.service
[Service]
Type=oneshot
ExecStart=/usr/bin/mu index
Environment=MAILDIR=/home/difrex/Mail # тут нужно указать свой MAILDIR
```
Включаем и стартуем
```sh
systemctl --user enable mu.timer
systemctl --user start my.timer
```
### i3blocks
Настроим вывод значка с колличеством непрочтенных писем в i3bar и отправку уведомлений.
Для этого напишем простой скрипт на bash.
*~/.config/i3/mail.sh*
```sh
#!/bin/bash
MAILDIR=/home/difrex/Mail; export MAILDIR # тут нужно указать свой MAILDIR
COUNT="$(/usr/bin/mu find date:15m..now and flag:unread 2>/dev/null | wc -l)"
# Write notify lock
write_notify_lock() {
mkdir -p ~/.cache
echo $COUNT > ~/.cache/.mail_notify_lock
}
# Cleanup lock
clean_notify_lock() {
rm -f ~/.cache/.mail_notify_lock
}
if [[ $COUNT -gt 0 ]]; then
if [[ ! -f ~/.cache/.mail_notify_lock ]] || [[ $COUNT -gt $(/usr/bin/cat ~/.cache/.mail_notify_lock) ]]; then
write_notify_lock
/usr/bin/notify-send 'New mail' "$(/usr/bin/mu find date:15m..now and flag:unread 2>/dev/null | tail -1)"
fi
else
if [[ -f ~/.cache/.mail_notify_lock ]]; then
clean_notify_lock
fi
fi
echo $COUNT
```
> <font color="green">Не забываем сделать скрипт исполняемым</font>
И в конфиг *i3blocks.conf* нужно добать секцию с нашим скриптом:
```ini
[mail]
label=
interval=30
command=~/.config/i3/mail.sh
```
Выглядит иконка в баре вот так: ![i3bar mail icon](/images/gnus/i3bar.png)
А уведомление в dunst так: ![dunst notification](/images/gnus/dunst.png)
## Gnus
Переходим к самому интересному, а именно к настройке Gnus.
Редактируем файл *~/.gnus.el*.
```lisp
;;; .gnus.el --- GNUs configuration
;;; Commentary:
;;; Code:
(require 'all-the-icons-gnus) ;; Наводим красоту
(all-the-icons-gnus-setup)
(setq user-mail-address "my_email@example.com") ;; Будет по-умолчанию в поле From
(setq user-full-name "Denis Zheleztsov") ;; Устанавливаем, как нас зовут
;; Показываем, что нужно смотреть в MAILDIR
(setq gnus-select-method
'(nnmaildir "mail" (directory "~/Mail"))
mail-sources '((maildir :path "~/Mail" :subdirs ("cur" "new")))
mail-source-delete-incoming nil)
;; arbitrary name after "nnmaildir+"
(setq gnus-message-archive-group "nnmaildir+mail:outbox")
(setq message-sendmail-envelope-from 'header)
(setq mail-envelope-from 'header)
(setq message-send-mail-function 'message-send-mail-with-sendmail)
;; Устанавливаем в качестве программы для отправки писем msmtp
(setq sendmail-program "/usr/bin/msmtp")
(setq message-sendmail-envelope-from 'header)
;; Сортируем письма по дате
(setq gnus-thread-sort-functions '(gnus-thread-sort-by-most-recent-date))
;; Добавляем автодополнение по TAB для поля To
(add-hook 'message-mode-hook
(function (lambda()
(local-set-key (kbd "<tab>") 'bbdb-complete-mail))))
;; Если адресса получателя нет в базе BBDB - добавляем
(add-hook 'message-setup-hook 'bbdb-mail-aliases)
;; Добавляем в базу контактов адресатов из входящей почты
(bbdb-initialize 'gnus 'message)
(bbdb-mua-auto-update-init 'gnus)
(setq bbdb-mua-auto-update-p 'create)
;; Говорим демону Gnus проверять новую почту каждые пять минут
(gnus-demon-add-handler 'gnus-demon-scan-news 5 t)
(gnus-demon-init)
;;; .gnus.el ends here
```
Все! Нажимаем ```M-x RET gnus RET``` и радуемся.
Так выглядит буфер с группами и непрочитанными сообщениями: ![gnus groups buffer](/images/gnus/gnus_groups.png)
А так список сабжей в группе(синим цветом показаны прочитанные сообщения):
![gnus view group](/images/gnus/gnus_view_group.png)
> <font color="green">Обновлять групповой буфер можно по **g**, а написать новое сообщение по **m**.
> Отправить набраное сообщение через **C-c C-c**. Ответ на сообщение с цитатой **R**, без - **r**.</font>

View File

@ -0,0 +1,88 @@
+++
date = "2017-10-31T22:19:50+03:00"
draft = false
title = "Go в GNU Emacs"
tags = ["emacs"]
comments = true
+++
На самом деле это выжимка вот этой [[http://tleyden.github.io/blog/2014/05/22/configure-emacs-as-a-go-editor-from-scratch/][статьи]].
Ну, а еще некоторые вещи в ней устарели, по-этому немного обновленная версия.
* tl;dr
Поставим нужные пакеты в Емакс
#+BEGIN_SRC emacs-lisp
(use-package exec-path-from-shell)
(use-package rainbow-delimiters)
(use-package go-snippets)
(use-package go-guru)
(use-package go-autocomplete)
#+END_SRC
Настроим go-mode
#+BEGIN_SRC emacs-lisp
(use-package go-mode
;; Godef jump key binding
:bind (("M-." . godef-jump)
("M-*" . pop-tag-mark))
:init
(setenv "GOPATH" (concat (getenv "HOME") "/.local"))
:config
(defun set-exec-path-from-shell-PATH ()
(let ((path-from-shell (replace-regexp-in-string
"[ \t\n]*$"
""
(shell-command-to-string "/bin/bash -c '. ~/.bashrc && echo $PATH'"))))
(setenv "PATH" path-from-shell)
;; (setq eshell-path-env path-from-shell) ; for eshell users
(setq exec-path (split-string path-from-shell path-separator))))
(when window-system (set-exec-path-from-shell-PATH))
(defun my-go-mode-hook ()
"My Golang hook."
(setq gofmt-command "goimports")
;; Call Gofmt before saving
(add-hook 'before-save-hook 'gofmt-before-save)
;; Set compile command
(if (not (string-match "go" compile-command))
(set (make-local-variable 'compile-command)
"go build -v && go test -v && go vet"))
;; Enable rainbow
(rainbow-delimiters-mode-enable)
(auto-complete-for-go)
(yas-initialize))
;; Go autocomplete
(defun auto-complete-for-go ()
"Enable golang autocomple."
(auto-complete-mode 1))
(add-hook 'go-mode-hook 'auto-complete-for-go)
(add-hook 'completion-at-point-functions 'go-complete-at-point)
(add-hook 'go-mode-hook 'my-go-mode-hook)
(add-hook 'go-mode-hook #'rainbow-delimiters-mode))
#+END_SRC
Тут в *:bind* можно прописать свои сочетания клавиш.
Да, всегда используйте [[https://github.com/jwiegley/use-package][use-package]]. Это сэкономит кучу времени в будущем.
Теперь добавим GOPATH в ~/.bashrc
#+BEGIN_SRC
echo 'export GOPATH=${HOME}/.local' >> ~/.bashrc
. ~/.bashrc
#+END_SRC
Выкачиваем зависимости Go
#+BEGIN_SRC
go get -t -v golang.org/x/tools/cmd/goimports
go get -t -v golang.org/x/tools/cmd/guru
go get -t -v github.com/rogpeppe/godef
#+END_SRC
Готово. Код конфига доступен по [[https://github.com/Difrex/emacs-go][ссылке]].

View File

@ -0,0 +1,95 @@
+++
date = "2017-10-31T17:23:44+03:00"
draft = true
title = "Готовим конфиг GNU Emacs"
tags = ["emacs"]
comments = true
+++
Часто конфигурационный файл GNU Emacs выглядит, как помойка - нагромождение копипасты и говнокода. Почти на
каждую строчку ругается flycheck. Все очень плохо. Попробуем это исправить.
Итак. Создадим чистый ~/.emacs.d/init.el и сразу подключаем репозитории пакетов.
```lisp
;;; init.el --- main emacs config
;;; Commentary:
;;; Code:
;; Packages
(require 'package) ;; You might already have this line
(let* ((no-ssl (and (memq system-type '(windows-nt ms-dos))
(not (gnutls-available-p))))
(url (concat (if no-ssl "http" "https") "://melpa.org/packages/")))
(add-to-list 'package-archives (cons "melpa" url) t))
(when (< emacs-major-version 24)
;; For important compatibility libraries like cl-lib
(add-to-list 'package-archives '("gnu" . "http://elpa.gnu.org/packages/")))
(package-initialize) ;; You might already have this line
;;; init.el ends here
```
Следующим шагом скажем Gnu Emacs, чтобы он запускал сервер если работает на GNU/Linux или MacOS.
```lisp
;; define system
(defun system-is-linux()
(string-equal system-type "gnu/linux"))
(defun system-is-darwin()
(string-equal system-type "darwin"))
;; Start Emacs as server. Linux and MacOS support
(when (or (system-is-linux) (system-is-darwin))
(require 'server)
(unless (server-running-p)
(server-start)))
```
Прелесть в запуске сервера - мгновенное открытие новых окон емакс и шаринг буферов между ними.
А теперь можно начать готовить красивый конфиг разделенный по назначению. Создаем файлы
~/.emacs.d/config/common/common.el, ~/.emacs.d/config/common/packages-config.el. В packages-config.el выносим код из init.el
и оборачиваем в функцию. packages-config.el станет выглядеть примерно так:
```lisp
;;; packages-config.el --- repo config
;;; COMMENTARY:
;;; Code:
(require 'package)
(defun configure-packages ()
"Set MELPA and ELPA repositories."
(let* ((no-ssl (and (memq system-type '(windows-nt ms-dos))
(not (gnutls-available-p))))
(url (concat (if no-ssl "http" "https") "://melpa.org/packages/")))
(add-to-list 'package-archives (cons "melpa" url) t))
(when (< emacs-major-version 24)
;; For important compatibility libraries like cl-lib
(add-to-list 'package-archives '("gnu" . "http://elpa.gnu.org/packages/")))
(package-initialize))
(provide 'packages-config)
;;; packages-config.el ends here
```
В common.el пишем
```lisp
;;; common.el --- base configuration
;;; COMMENTARY:
;;; Code:
(require 'packages-config)
(package-install "use-package")
(provide 'common)
;;; common.el ends here
```

208
content/post/i3wm-config.md Normal file
View File

@ -0,0 +1,208 @@
+++
date = "2017-05-14T13:14:34+03:00"
draft = false
title = "Пилим i3wm"
comments = true
tags = ["linux", "i3wm", "polybar"]
+++
Я тут на ЛОРе недавно [постил](https://www.linux.org.ru/gallery/screenshots/13401732) скриншот и, вроде, людям понравилось.
Попробую разобрать тут свой конфиг.
## Софт
Я использую Ubuntu 16.04, так что все действия актуальны для нее.
* [i3-gaps](https://github.com/Airblader/i3)
Это форк оригинального i3, где добавляются гапсы(отступы между окнами).
Сборку и установку производим так:
```
git clone https://github.com/Airblader/i3 -b 4.13
cd i3
dpkg-checkbuilddeps # проверяем какие зависимости нужно установить для сборки пакета, устанавливаем их.
dpkg-buildpackage -uc -us # собираем пакет
sudo dpkg -i ../i3-wm_4.13-1_amd64.deb # устанавливаем
```
* i3lock
Это блокировщик экрана. Ставим его из репозитория *universe*.
* compton
Тени, прозрачности и прочая красота. Так же ставим из официальных репозиториев.
* [polybar](https://github.com/jaagr/polybar)
Панель, которую я использую в качестве замены стандартного i3bar.
Компиляем
```
git clone --branch 3.0.5 --recursive https://github.com/jaagr/polybar
mkdir polybar/build
cd polybar/build
cmake ..
make install
```
* rofi
Лаунчер. Так же ставим из репозиториев.
* feh
На самом деле - это просмотрщик изображений, но еще он позволяет установить обои.
* dunst
Уведомления(libnotify) рабочего стола.
## Конфигурация
Можно приступать к настройке WM.
~/.config/i3/config
```
# Клавиша super в качестве модификатора
set $mod Mod4
# Шрифты
font pango:hack 12
# Alt в качестве модификатора для управления плавающими окнами
floating_modifier Mod1
# Терминал
bindsym $mod+Return exec i3-sensible-terminal
# Закрытие окна
bindsym $mod+q kill
# Запуск лаунчера
bindsym $mod+d exec rofi -show run
```
Для настройки цветов лаунчера в ~/.Xresources пишем:
```
! ------------------------------------------------------------------------------
! ROFI Color theme
! ------------------------------------------------------------------------------
rofi.color-enabled: true
rofi.color-window: #393939, #393939, #268bd2
rofi.color-normal: #393939, #ffffff, #393939, #268bd2, #ffffff
rofi.color-active: #393939, #268bd2, #393939, #268bd2, #205171
rofi.color-urgent: #393939, #f3843d, #393939, #268bd2, #ffc39c
```
[![](/images/i3wm/rofi.png)](/images/i3wm/rofi.png)
*Hint*: На сайте rofi можно найти несколько [тем](https://davedavenport.github.io/rofi/p05-Themes.html).
Локсрин. Биндим i3lock на $mod+l.
```
# Lock desktop
bindsym $mod+l exec ~/.config/i3/lock.sh
```
Скрипт ~/.config/i3/lock.sh:
```bash
#!/bin/bash
# Make screenshot
scrot /tmp/screen.png
# Scale image
convert -scale 10% -scale 1000% /tmp/screen.png /tmp/screen1.png
# Clean
rm -f /tmp/screen.png
# Lock screen
i3lock -i /tmp/screen1.png
```
Выглядит это так:
[![](/images/i3wm/lock.png)](/images/i3wm/lock.png)
Идем дальше по конфигу.
```
# Переключение между окнами:
bindsym $mod+Left focus left
bindsym $mod+Down focus down
bindsym $mod+Up focus up
bindsym $mod+Right focus right
```
Я не использую комбинацию $mod+jklh для переключения между окнами, мне хватает стрелочек.
По-этому можно закомментить дефолтную секцию с этими настройками.
Я пропущу дальше секции про управление окнами, т.к. конфиг практически ничем не отличается от дефолтоного. Удаляем/комментируем секцию с i3bar.
Убираем декорации окон
```
# New window size
new_window pixel
```
Мультимедиа кнопки
```
# Pulse Audio controls
bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume 0 +5% #increase sound volume
bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume 0 -5% #decrease sound volume
bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute 0 toggle # mute sound
# Sreen brightness controls
bindsym XF86MonBrightnessUp exec xbacklight -inc 20 # increase screen brightness
bindsym XF86MonBrightnessDown exec xbacklight -dec 20 # decrease screen brightness
```
Настройка гапсов
```
# Эта опция нужна для того, чтобы гапсы отключались, если на эркане всего одно окно.
smart_gaps on
gaps inner 5
gaps outer 2
```
Автозапуск приложений
```
# Обои
exec feh --bg-scale /usr/share/backgrounds/gnome/Godafoss_Iceland.jpg &
# Автоблокировка экрана через 2 минуты
exec xautolock -locker ~/.config/i3/lock.sh -time 2 &
# Апллет для управления network-manager
exec nm-applet &
# Композитор
exec compton &
# Conky
exec conky -c /home/d_zheleztsov/.conkyrc &
# Почему-то без такого костыля у меня dunst запускаться не хочет
exec killall dunst && dunst -conf /home/d_zheleztsov/.config/dunst &
# Изменение цветовой температуры в зависимости от времени суток
exec redshift &
# Запускаем приложения на своих рабочих столах
exec --no-startup-id i3-msg 'workspace 1; exec firefox'
exec --no-startup-id i3-msg 'workspace 2; exec gnome-terminal'
exec --no-startup-id i3-msg 'workspace 3; exec emacs25'
exec --no-startup-id i3-msg 'workspace 4; exec pidgin'
exec --no-startup-id i3-msg 'workspace 5; exec evolution'
# Панель
exec ~/.local/bin/polybar main &
```
По поводу конфигурации панели будет хорошо почитать официальную [вики](https://github.com/jaagr/polybar/wiki).
## Итоговые конфиги
* i3: [~/.config/i3/config](https://pastebin.com/zYF5c2Yd)
* polybar: [~/.config/polybar/config](https://pastebin.com/i3Mekvuv)
* conky: [~/.conkyrc](https://pastebin.com/gz1kC6PF)
## Что получилось
[![](/images/i3wm/result.png)](/images/i3wm/result.png)

View File

@ -0,0 +1,90 @@
+++
date = "2017-09-02T16:28:50+03:00"
draft = false
title = "Отправляем логи в удаленный logstash"
tags = ["linux", "elasticsearch", "logstash"]
commets = true
+++
Все привыкли пользоваться связкой ELK. А что делать, если хочется отправить логи
в уже существующий ELK с хоста на котором памяти в обрез?
У меня получилось так, что на виртуалке с сайтиком всего 512Мб памяти и логстешь при запуске просто
выжирал ее всю и падал. Никакие Xmx Xms не помогали. Самое интересное, что логи-то nginx я заставил
писать в JSON, а значит logstash выступает просто проксей до эластика.
Вот так можно заставить писать nginx в JSON. Добавляем это в nginx.conf.
```
log_format logstash_json '{ "@timestamp": "$time_iso8601", '
'"remote_addr": "$remote_addr", '
'"remote_user": "$remote_user", '
'"body_bytes_sent": "$body_bytes_sent", '
'"request_time": "$request_time", '
'"status": "$status", '
'"request": "$request", '
'"request_method": "$request_method", '
'"http_referrer": "$http_referer", '
'"http_user_agent": "$http_user_agent" }';
```
А в конфиге сайта
```
access_log /var/log/nginx/access.log logstash_json;
```
Собственно пишем конфиг удаленного логстеша:
```
input {
tcp {
port => 12222
host => "10.8.0.10"
codec => "json"
}
}
output {
elasticsearch {
index => "nginx"
}
}
```
Теперь делаем скрипт отправки логов:
```sh
#!/bin/bash
# /usr/local/bin/logsend.sh
/usr/bin/tail -f /var/log/nginx/access.log | /bin/nc 10.8.0.10 12222
```
И запиливаем сервис systemd и стартуем его
```
[Unit]
Description=Send nginx log to remote logstash
[Service]
Type=simple
ExecStart=/usr/local/bin/logsend.sh
[Install]
WantedBy=multi-user.target
```
systemctl status logsend
```
● logsend.service - Send nginx log to remote logstash
Loaded: loaded (/etc/systemd/system/logsend.service; enabled; vendor preset: enabled)
Active: active (running) since Sat 2017-09-02 12:05:01 UTC; 1h 33min ago
Main PID: 28559 (logsend.sh)
Tasks: 3
Memory: 484.0K
CPU: 12ms
CGroup: /system.slice/logsend.service
├─28559 /bin/bash /usr/local/bin/logsend.sh
├─28562 /usr/bin/tail -f /var/log/nginx/access.log
└─28563 /bin/nc 10.8.0.10 12222
```
Использование памяти пол-мегабайта :).

View File

@ -0,0 +1,29 @@
+++
date = "2017-05-13T22:36:15+03:00"
draft = false
title = "Минск 08.05.2017"
comments = true
tags = ["фото", "минск", "беларусь"]
+++
Фотки без обработки, тупо RawTherapee -> export.
## Верхний город
![](/images/minsk-08-05-17/DSC_0088.jpg)
![](/images/minsk-08-05-17/DSC_0092.jpg)
## Центр
![](/images/minsk-08-05-17/DSC_0096.jpg)
![](/images/minsk-08-05-17/DSC_0100.jpg)
![](/images/minsk-08-05-17/DSC_0103.jpg)
## Площадь независимости
![](/images/minsk-08-05-17/DSC_0113.jpg)
![](/images/minsk-08-05-17/DSC_0119.jpg)
![](/images/minsk-08-05-17/DSC_0129.jpg)
![](/images/minsk-08-05-17/DSC_0136.jpg)

80
content/post/pro-idec.md Normal file
View File

@ -0,0 +1,80 @@
+++
date = "2018-01-12T10:58:39+03:00"
draft = false
title = "Про IDEC"
tags = ["idec"]
comments = true
+++
IDEC - это протокол обмена сообщениями совместимый на базовом уровне с ii. Расшифровывается, как ii-like Data Exchange Convention.
Главная фишка его - это простота и возможность работать поверх чего угодно, например, ssh.
Но практически все реализации сейчас работают поверх http.
Цитата из официальной [документации](https://ii-net.tk/idec-doc/)
>Есть несколько серверов (грубо говоря, сайтов), за каждым из которых закреплены свои пользователи (поинты). Поинты пишут сообщения каждый на свой сервер.
>Через каждые 10-20 минут сервера скачивают друг у друга новые сообщения. В итоге на всю сеть одна общая база данных.
>Для установления цепочек синхронизации владельцы серверов сначала договариваются.
>Всё общение разделено на так называемые эхоконференции или эхи (см. терминология). Эха - это что-то вроде ленты твиттера или темы на форуме.
>Пользователи могут свободно подписываться на интересные им эхи и писать туда сообщения в пределах одной станции.
>Держатели серверов синхронизируют между собой (по общему согласию) самые популярные и нужные пользователям эхи, и сообщения оттуда расходятся по всей сети.
Так при отключении одного из серверов, сообщения останутся живы на других, что дает нам такие блага, как антицензурируемость и отказоустойчивость.
## Общение
В стандарте предусмотрена очень полезная фича, как /list.txt(это может быть на самом деле файл или путь в строке адреса в браузере).
На запрос list.txt сервер возвращает нам список эх(публичных) с описанием и количеством сообщений в них.
Так при первом попадании на сервер, клиент сможет сразу знать какие эхи он хочет читать.
Стандарт и все реализации серверов поддерживают создание эхи пользователем. Для этого нужно всего лишь написать в нее. Такая эха не
будет отображаться в list.txt и получить из нее сообщения можно, только зная название. Шифрования в стандарте нет, но это и не нужно,
ибо приносит только усложнение. Для приватного общения можно использовать скрытую эху и GPG.
Личных сообщений нет, но обсуждение стандарта идет. Можно начать с чтения [этого](https://dynamic.lessmore.pw/?j=FGOqT29oVwwBElTJNMjx) треда.
Каждое сообщение в сети уникально, т.е. ему присвается ID сгенерированный на основе суммы sha256 от контента. Это не спасает от спама,
но позволяет избежать коллизий в сети.
## Устройство сети
На протоколе IDEC чаще всего реализуют децентрализованную клиент-сервер сеть.
P2P не предусмотрено, но никто не мешает написать свое расширение, которое реализует P2P обмен.
Итак, рассмотрим топологию сети от простого к сложному.
Самая простейшая сеть выглядит так:
![img](/images/idec/idec1.png)
У нас есть два клиента, которые обмениваются сообщениями через сервер. Оба клиента получают сообщения из одной и той же эхи.
Все централизовано и при смерти сервера клиенты больше не смогут общаться с друг дугом. Давайте добавим еще один сервер!
![img](/images/idec/idec2.png)
Владельцы серверов договорились между собой обмениваться сообщениями эхи pipe.2032, теперь при выходе из строя одного из серверов
сообщения будут доступны на другом сервере.
Добавим еще сегмент сети
![img](/images/idec/idec3.png)
У нас добавился еще один сегмент сети в котором происходит общение в эхах pipe.2032 и linux.14.
Так наш первый сегмент начинает обмениваться сообщениями со вторым. Добавим еще один сегмент.
![img](/images/idec/idec4.png)
И еще
![img](/images/idec/idec5.png)
Можно еще добавить связь между серверами внутри кольца и мы получим полностью децентрализованную сеть, которая реализует
распределенную базу данных.
IDEC позволяет строить любые топологии. Клиент может выступать так же и сервером и забирать сообщения сразу со всех серверов.
А простота протокола позволяет писать ботов очень быстро.
В следующей статье напишем бота, который будет слать сообщения в указанную нами эху.

142
content/post/python-lsp.md Normal file
View File

@ -0,0 +1,142 @@
+++
date = "2018-07-30T15:25:28+03:00"
draft = false
title = "Автодополнение для python с LSP в GNU Emacs"
tags = ["emacs", "python"]
comments = true
+++
The Language Server Protocol (LSP) -- это открытый, основанный на JSON-RPC протокол для использования между редакторами исходного кода и серверами, которые предоставляют специфические для языка программирования функции. Цель протокола заключается в том, чтобы обеспечить поддержку автодополнения языка программирования независимо от любого редактора или среды IDE.
LSP дает реально крутые штуки, такие как:
* Показ документации для модуля под курсором
[![documentation](/images/lsp/documentation.png)](/images/lsp/documentation.png)
* Автодополнение по точке. На самом деле это `company-lsp`, но про это будет дальше.
[![completion](/images/lsp/completion.png)](/images/lsp/completion.png)
* Интеграция с flycheck
[![flycheck](/images/lsp/flycheck.png)](/images/lsp/flycheck.png)
И еще кучу всего на самом деле. Все возможные настройки можно будет увидеть по `M-x customize RET lsp RET`.
## Конфигурация
Для начала нужно установить сам language server для python. Для Arch/Manjaro установка будет выглядеть так:
```sh
sudo pacman -S python-language-server
```
С системными зависимостями разобрались. Приступаем к `init.el`. Будем использовать `use-package`, потому что
не использовать его -- это отстой. Но каждый решает сам.
Включаем `lsp-mode`. Да, для lsp нужно что-то, чем определить корневой каталог для проекта.
Я использую везде projectile.
```lisp
;; LSP settings
(use-package lsp-mode
:ensure t
:config
;; make sure we have lsp-imenu everywhere we have LSP
(require 'lsp-imenu)
(add-hook 'lsp-after-open-hook 'lsp-enable-imenu)
;; get lsp-python-enable defined
;; NB: use either projectile-project-root or ffip-get-project-root-directory
;; or any other function that can be used to find the root directory of a project
(lsp-define-stdio-client lsp-python "python"
#'projectile-project-root
'("pyls"))
;; make sure this is activated when python-mode is activated
;; lsp-python-enable is created by macro above
(add-hook 'python-mode-hook 'lsp-python-enable)
;; lsp extras
(use-package lsp-ui
:ensure t
:config
(setq lsp-ui-sideline-ignore-duplicate t)
(add-hook 'lsp-mode-hook 'lsp-ui-mode))
(use-package company-lsp
:config
(push 'company-lsp company-backends))
;; NB: only required if you prefer flake8 instead of the default
;; send pyls config via lsp-after-initialize-hook -- harmless for
;; other servers due to pyls key, but would prefer only sending this
;; when pyls gets initialised (:initialize function in
;; lsp-define-stdio-client is invoked too early (before server
;; start)) -- cpbotha
(defun lsp-set-cfg ()
(let ((lsp-cfg `(:pyls (:configurationSources ("flake8")))))
;; TODO: check lsp--cur-workspace here to decide per server / project
(lsp--set-configuration lsp-cfg)))
(add-hook 'lsp-after-initialize-hook 'lsp-set-cfg))
```
flake8, autopep8, fci, anaconda, rainbow-delimiters(я их везде юзаю):
```lisp
;; Python mode hook
(defun my-python-mode-hook ()
"Define hook."
(use-package flymake-python-pyflakes
:config
(setq flymake-python-pyflakes-executable "flake8")
(setq flymake-python-pyflakes-extra-arguments '("--max-line-length=99"))
(flymake-python-pyflakes-load))
(use-package py-autopep8
:config
(setq py-autopep8-options '("--max-line-length=99"))
(py-autopep8-enable-on-save))
;; Enable rainbow
(use-package rainbow-delimiters)
(rainbow-delimiters-mode-enable)
(use-package highlight-indent-guides)
(use-package company)
(use-package anaconda-mode)
(use-package company-anaconda
:config
(add-to-list 'company-backends '(company-anaconda :with company-capf)))
(use-package flycheck-pyflakes
:config
(setq flychek-flake8-maximum-line-lenght 99))
(setq-default py-shell-name "ipython")
(setq-default py-which-bufname "IPython")
;; Fill column indicator
(use-package fill-column-indicator
:init
:config
(setq-default fill-column 99)
(setq fci-rule-width 1)
(setq fci-rule-color "#696969"))
(fci-mode)
(anaconda-mode +1)
(anaconda-eldoc-mode)
(highlight-symbol-mode +1)
(highlight-indent-guides-mode)
(company-mode))
(use-package python
:mode ("\\.py\\'" . python-mode)
:interpreter ("python" . python-mode)
:init
(add-hook 'python-mode-hook 'my-python-mode-hook))
```
Все!
Спасибо вот этому [чуваку](https://vxlabs.com/2018/06/08/python-language-server-with-emacs-and-lsp-mode/).

53
content/post/riga.md Normal file
View File

@ -0,0 +1,53 @@
+++
date = "2017-05-12T14:58:34+03:00"
draft = false
title = "Рига"
tags = ["рига", "фото"]
comments = true
+++
Съездили тут на днях погулять в Латвию. Сели в машину и поехали.
Границу пересекали в [Бемякони](https://yandex.by/maps/?ncrnd%3D9700&mode%3Dsearch&text%3D%D0%B1%D0%B5%D0%BC%D1%8F%D0%BA%D0%BE%D0%BD%D0%B8&sll%3D27.561831,53.902257&sspn%3D0.515671,0.201936&ll%3D25.353377,54.249157&z%3D15), туда(к литовцам) въехали за два часа -- нормалек.
Периодически шел дождь, но в целом погода была ничего.
![](/images/riga/DSC_0008.jpg)
## Рига
От границы до Риги дорога заняла часа 4-5. Старый город порадовал, красив.
![](/images/riga/DSC_0100-1.jpg)
![](/images/riga/DSC_0104.jpg)
![](/images/riga/DSC_0871.jpg)
![](/images/riga/DSC_0071.jpg)
![](/images/riga/DSC_0075.jpg)
Заехали на море(Рижский залив точнее). Пустынный солнечный пляж - это прикольно,
но ледяной ветер не давал вдоволь насладиться видом и пробыли мы там всего минут 30.
![](/images/riga/DSC_0019.jpg)
Помимо Риги заезжали еще в несколько мест.
## Цесис
![](/images/riga/DSC_0952.jpg)
![](/images/riga/DSC_0889.jpg)
## Бауска
![](/images/riga/DSC_0813.jpg)
![](/images/riga/DSC_0809.jpg)
## Тракай
![](/images/riga/DSC_0963.jpg)
![](/images/riga/DSC_0982.jpg)
## Дорога обратно
По дороге обратно дождь чередовался с солнцем и было красиво.
![](/images/riga/DSC_0183.jpg.jpg)
Границу пересекли вечером за 3 часа. В Минск приехали уже в час ночи.
![](/images/riga/DSC_0062.jpg.jpg)

View File

@ -0,0 +1,150 @@
+++
date = "2019-04-06T09:13:27+03:00"
draft = false
title = "Автоматический тайлинг в Sway"
tags = ["linux", "sway", "tiling", "i3wm"]
comments = true
+++
Я давно использую i3wm в работе, а после выхода версии 1.0 Sway я перешел на него с i3.
Sway -- это пракатически полностью совместимый с i3 композитор Wayland. По-этому перейти на него оказалось
очень просто. Мои конфиги Sway можно посмотреть на [Github](https://github.com/Difrex/sway).
Почему-то я долгое время думал, что мне в i3/sway не хватает полностью ручного тайлинга, я пробовал
различные оконные менеджеры с ручным тайлингом, такие как, `bspwm`, `herbstlutfwm` и другие, но они не заходили.
Потом я решил попробовать AwesomeWM, все-таки это по сути фреймворк и на Lua можно написать все, что угодно.
В нем мне очень понравилась стандартная возможность автоматического тайлинга. Вот, что мне переодически нужно, подумал я.
Но во всех WM, что я пробовал не было нормальной поддержки скретчпадов - это такие плавающие окна, которые
большую часть времени скрыты, и показать их можно, например по комбинации клавишь.
Что же мне на самом деле хотелось от WM - скретчпады, полуручной и автоматический тайлинг, возможность менять поведение
скриптами на любом языке. По всем параметрам подходил Sway за исключением автоматического тайлинга. Было решено добавить
его самостоятельно.
После небольшого иследования этого вопроса оказалось, что у sway есть IPC с возможностью подписки на определенные события.
Проблема возникла в том, что существующие биндинги к i3 ipc не подходили, т.к. формат дерева в JSON у Sway отличается, а так же
добавляются новые возможности, типа, получения устройств ввода, чего не было в i3.
Так я решил написать(и написал) биндинг к Sway IPC на Go. И уже поверх этого начал писать демона, который реализует автоматический тайлинг.
На данный момент я реализовал `spiral` layout, который работает, так как я хочу и полностью меня устраивает. Так же на начальном этапе
реализован `left` layout. Демонстрацию этих режимов можно посмотреть в видео ниже.
<video
width="480"
heigh="640"
src="/video/Swaymgr.mp4" controls></video>
## Как этим воспользоваться?
Для начала нужно скомпилировать swaymgr. Из зависимостей только Go - поставь его из репозиториев твоего дистрибутива.
```
git clone https://github.com/Difrex/gosway
cd gosway/swaymgr
go get -t -v ./...
go build -o ~/.local/bin/swaymgr
```
Теперь можно добавить swaymgr в конфигурацию sway. Добавь следующие строчки в `~/.config/sway/config`
```
exec_always ~/.local/bin/swaymgr
bindsym $mod+Alt+m exec ~/.local/bin/swaymgr -s 'set manual'
bindsym $mod+Alt+l exec ~/.local/bin/swaymgr -s 'set left'
bindsym $mod+Alt+s exec ~/.local/bin/swaymgr -s 'set spiral'
```
Комбинации клавишь меняй по своему вкусу.
Swaymgr запоминает свою расскладку для каждого рабочего стола, а состояние хранит в `~/.autotiling.bolt`.
В репозитории ты так же найдешь скрипт, который можно использовать, например, с `i3blocks`.
## Про внутреннее устройство
Если вдруг тебе захочется помочь в разработке, то вот небольшой гайд по тому, как правильно это сделать.
Swaymgr -- это отлельное приложение, которое использует `gosway/ipc`.
Для того, чтобы взаимодействовать со Sway через unix-socket необходимо два подключения:
1. Соединение для передачи различных комманд
2. Соединение на которое будут приниматься события от оконного менеджера
Так же для хранения настроек рабочих столов используется встроенная, минималистичная база данных Bolt. Функция `newManager() (*manager, error)` создает все необходимые подключения и вызывает функцию инициализации интерфейсов `Layout`.
Возвращаемая структура имеет такой вид:
```go
type manager struct {
commandConn *ipc.SwayConnection
listenerConn *ipc.SwayConnection
store *store
layouts map[string]Layout
}
```
Главный интерфейс, с помощью которого реализуются все режимы -- Layout, выглядит он так:
Файл `swaymgr/layouts.go`
```go
type Layout interface {
// PlaceWindow must receive an *ipc.Event
// and do the container manipulation
PlaceWindow(*ipc.Event) error
// Manage must store WorkspaceConfig in the database with
// the workspace name, layout name and with the Managed: true
Manage() error
}
```
У этого интерфейса есть всего два метода:
* `Manage() error` -- вызывается тогда, когда текущий рабочий стол переключается в какой-либо режим
* `PlaceWindow(*ipc.Event) error` -- вызывается тогда, когда создается новый контейнер на рабочем столе, который является управляемым.
### Как работает spiral layout
Я рассмотрю управлене окнами на примере реализации режима spiral.
Структура этого режима состоит всего из двух полей:
* `Conn *ipc.SwayConnection` -- Коммандное подключение к unix-сокету Sway
* `store *store` -- Открытое соединение к базе данных, в котой хранятся текущие настройки рабочих столов
При наступлении события создания нового окна, и если текущий рабочий стол управляется, данное событие передается в метод `PlaceWindow(event *ipc.Event)`.
Для начала необходимо найти текущее окно на котором находится фокус:
```go
nodes, err := s.Conn.GetFocusedWorkspaceWindows()
if err != nil {
return err
}
var result ipc.Node
for _, node := range nodes {
if node.Focused {
result = node
break
}
}
```
Далее вся логика позиционированния окон помещается в 7 строчек:
```go
if result.WindowRect.Width > result.WindowRect.Height {
_, err := s.Conn.RunSwayCommand(fmt.Sprintf("[con_id=%d] split h", event.Container.ID))
return err
} else {
_, err := s.Conn.RunSwayCommand(fmt.Sprintf("[con_id=%d] split v", event.Container.ID))
return err
}
```
Если у окна с фокусом длина больше ширины, то новый контейнер разделяем по горизонтали, иначе по вертикали. Все. Это работает замечательно и эту логику работы менять я не буду.
## Зарезервированные режимы
Я заранее зарезервировал некоторые режимы которые очень хочется реализовать.
Вот они:
* `type FiberLayout struct{}` -- режим подсмотренный в AwesomeWM. Окна размещаются симметрично друг под другом и вдоль
* `type TopLayout struct{}` -- самое большое окно размещается вверху экрана, остальные внизу разделяясь по горизонтали
* `type BottomLayout struct{}` -- тоже самое, что и для TopLayout, но главное окно находится внизу
* `type RightLayout struct{}` -- тоже самое, что и LeftLayout, но главное окно размещается справа
Проект на [Github](http://github.com/Difrex/gosway). Учитывай, что это пока самая ранняя реализация и тут могут быть баги в больших
колличествах, правда ничего критичного я пока не находил -- пользоваться можно.
Буду очень рад баг-репортам и фич-реквестам, а так же особенно пулл-реквестам. Лицензия проекта: Apache.

View File

@ -0,0 +1,46 @@
<!DOCTYPE html>
<html lang="{{ .Site.LanguageCode }}">
<head>
{{ partial "head.html" . }}
</head>
<body>
<div class="container">
{{ partial "header.html" . }}
<div class="content">
<div class="posts">
{{ $paginator := .Paginate (where .Data.Pages "Type" "post") }} {{ range $paginator.Pages }}
<div class="post">
<h2 class="post-title"><a href="{{ .Permalink }}">{{ .Title }}</a></h2>
<span class="post-date">{{ .Date.Format "Jan 2, 2006" }}</span>
{{ if .Params.tags }}
<span class="post-tags">
{{ range .Params.tags }}
#<a href="{{ $.Site.BaseURL }}tags/{{ . | urlize }}">{{ . }}</a>&nbsp;
{{ end }}
</span>
{{ end }}
{{ if .Site.Params.Summary }}
<div class="summary">
{{ .Summary }}
<a class="read-more" href="{{.RelPermalink}}">&hellip;</a>
</div>
{{ else if .Site.Params.Content }}
<div class="content">
{{ .Content }}
</div>
{{ end }}
</div>
{{ end }}
</div>
{{ partial "pagination.html" . }}
</div>
{{ partial "footer.html" . }}
</div>
<script src="{{ .Site.BaseURL }}js/slim.js"></script>
{{ with .Site.Params.AnalyticsID }}{{ partial "analytics.html" . }}{{ end }}
</body>
</html>

24
layouts/_default/rss.xml Normal file
View File

@ -0,0 +1,24 @@
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>{{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{.}} on {{ end }}{{ .Site.Title }}{{ end }}</title>
<link>{{ .Permalink }}</link>
<description>Recent content {{ if ne .Title .Site.Title }}{{ with .Title }}in {{.}} {{ end }}{{ end }}on {{ .Site.Title }}</description>
<generator>Hugo -- gohugo.io</generator>{{ with .Site.LanguageCode }}
<language>{{.}}</language>{{end}}{{ with .Site.Author.email }}
<managingEditor>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</managingEditor>{{end}}{{ with .Site.Author.email }}
<webMaster>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</webMaster>{{end}}{{ with .Site.Copyright }}
<copyright>{{.}}</copyright>{{end}}{{ if not .Date.IsZero }}
<lastBuildDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</lastBuildDate>{{ end }}
<atom:link href="{{.Permalink}}" rel="self" type="application/rss+xml" />
{{ range .Data.Pages }}
<item>
<title>{{ .Title }}</title>
<link>{{ .Permalink }}</link>
<pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate>
{{ with .Site.Author.email }}<author>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</author>{{end}}
<guid>{{ .Permalink }}</guid>
<description>{{ .Content | html }}</description>
</item>
{{ end }}
</channel>
</rss>

View File

@ -0,0 +1,26 @@
<!DOCTYPE html>
<html>
<head>
{{ partial "head.html" . }}
</head>
<body>
<div class="container">
{{ partial "header.html" . }}
<div class="content">
<div class="post">
<h2 class="post-title"><a href="{{ .Permalink }}">{{ .Title }}</a></h2>
<div class="post-content">
{{ .Content }}
</div>
</div>
</div>
{{ partial "footer.html" . }}
</div>
<script src="{{ .Site.BaseURL }}js/slim.js"></script>
{{ with .Site.Params.AnalyticsID }}{{ partial "analytics.html" . }}{{ end }}
</body>
</html>

47
layouts/index.html Normal file
View File

@ -0,0 +1,47 @@
<!DOCTYPE html>
<html lang="{{ .Site.LanguageCode }}">
<head>
{{ partial "head.html" . }}
</head>
<body>
<a class="rss_icon" href="{{ .RSSLink }}" rel="feed" type="application/rss+xml" title="{{ .Site.Title }}"><img src="/images/Feed-icon.svg" width="16px"></img></a>
<div class="container">
{{ partial "header.html" . }}
<div class="content">
<div class="posts">
{{ $paginator := .Paginate (where .Data.Pages "Type" "post") }} {{ range $paginator.Pages }}
<div class="post">
<h2 class="post-title"><a href="{{ .Permalink }}">{{ .Title }}</a></h2>
<span class="post-date">{{ .Date.Format "Jan 2, 2006" }}</span>
{{ if .Params.tags }}
<span class="post-tags">
{{ range .Params.tags }}
#<a href="{{ $.Site.BaseURL }}tags/{{ . | urlize }}">{{ . }}</a>&nbsp;
{{ end }}
</span>
{{ end }}
{{ if .Site.Params.Summary }}
<div class="summary">
{{ .Summary }}
<a class="read-more" href="{{.RelPermalink}}">&hellip;</a>
</div>
{{ else if .Site.Params.Content }}
<div class="content">
{{ .Content }}
</div>
{{ end }}
</div>
{{ end }}
</div>
{{ partial "pagination.html" . }}
</div>
{{ partial "footer.html" . }}
</div>
<script src="{{ .Site.BaseURL }}js/slim.js"></script>
{{ with .Site.Params.AnalyticsID }}{{ partial "analytics.html" . }}{{ end }}
</body>
</html>

View File

View File

@ -0,0 +1,10 @@
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', '{{.}}', 'auto');
ga('send', 'pageview');
</script>

View File

@ -0,0 +1,11 @@
<div class="footer">
{{ if isset .Site.Params "FooterMsg" }}
<p>{{ .Site.Params.FooterMsg | safeHTML }}</p>
{{else}}
<p>2019 <a href="mailto:difrex@lessmore.pw">difrex@lessmore.pw</a>
<br>
<a rel="license" href="http://creativecommons.org/licenses/by-nc/4.0/"><img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by-nc/4.0/80x15.png" />
</a>
</p>
{{end}}
</div>

View File

@ -0,0 +1,17 @@
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1">
<title> {{ .Title }} </title>
<!-- CSS -->
<link rel="stylesheet" href="{{ .Site.BaseURL }}css/slim.css">
<link rel="stylesheet" href="{{ .Site.BaseURL }}css/highlight.min.css">
<link href='https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,700|Source+Code+Pro' rel='stylesheet' type='text/css'>
<!-- Icons -->
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="/apple-touch-icon-144-precomposed.png">
<link rel="shortcut icon" href="/favicon.ico">
<!-- RSS -->
{{ if .RSSLink }}
<link href="{{ .RSSLink }}" rel="alternate" type="application/rss+xml" title="{{ .Site.Title }}" />
<link href="{{ .RSSLink }}" rel="feed" type="application/rss+xml" title="{{ .Site.Title }}" />
{{ end }}

View File

@ -0,0 +1 @@
<a href="{{ .Site.BaseURL }}"><img class="ava" src="/images/ava.jpg"></img></a>

View File

@ -0,0 +1,5 @@
<div class="pagination">
{{ if .Paginator.HasPrev }}
<a class="btn previous" href="{{ .Paginator.Prev.URL }}">Newer</a> {{ end }} {{ if .Paginator.HasNext }}
<a class="btn next" href="{{ .Paginator.Next.URL }}">Older</a> {{ end }}
</div>

68
layouts/post/single.html Normal file
View File

@ -0,0 +1,68 @@
<!DOCTYPE html>
<html>
<head>
{{ partial "head.html" . }}
<!-- Put this script tag to the <head> of your page -->
<script type="text/javascript" src="//vk.com/js/api/openapi.js?146"></script>
<script type="text/javascript">
VK.init({apiId: 6028640, onlyWidgets: true});
</script>
</head>
<body>
<div class="container">
{{ partial "header.html" . }}
<div class="content">
<div class="posts">
<div class="post">
<h2 class="post-title"><a href="{{ .Permalink }}">{{ .Title }}</a></h2>
<span class="post-date">{{ .Date.Format "Jan 2, 2006 " }}</span>
<div class="post-content">
{{ .Content }}
</div>
</div>
<div class="pagination">{{ if .Prev }}
<a class="btn previous " href="{{.Prev.Permalink}}"> Prev</a> {{ end }} {{ if .Next }}
<a class="btn next " href="{{.Next.Permalink}}"> Next</a> {{ end }}
</div>
<div class="a2a_kit a2a_kit_size_32 a2a_default_style">
<a class="a2a_button_facebook"></a>
<a class="a2a_button_vk"></a>
</div>
<script async src="https://static.addtoany.com/menu/page.js"></script>
</div>
</div>
{{ if .Params.comments }}
<div id="disqus_thread"></div>
<script>
/**
* RECOMMENDED CONFIGURATION VARIABLES: EDIT AND UNCOMMENT THE SECTION BELOW TO INSERT DYNAMIC VALUES FROM YOUR PLATFORM OR CMS.
* LEARN WHY DEFINING THESE VARIABLES IS IMPORTANT: https://disqus.com/admin/universalcode/#configuration-variables*/
var disqus_config = function () {
this.page.url = "{{ .Permalink }}"; // Replace PAGE_URL with your page's canonical URL variable
this.page.identifier = "{{ .Title }}"; // Replace PAGE_IDENTIFIER with your page's unique identifier variable
};
(function() { // DON'T EDIT BELOW THIS LINE
var d = document, s = d.createElement('script');
s.src = 'https://https-difrex-lessmore-pw.disqus.com/embed.js';
s.setAttribute('data-timestamp', +new Date());
(d.head || d.body).appendChild(s);
})();
</script>
<noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
{{ end }}
<script src="{{ .Site.BaseURL }}js/slim.js"></script>
<script src="{{ .Site.BaseURL }}js/highlight.min.js"></script>
<script>
hljs.initHighlightingOnLoad();
</script>
{{ with .Site.Params.AnalyticsID }}{{ partial "analytics.html" . }}{{ end }}
</body>
</html>

View File

@ -0,0 +1,18 @@
<?xml version="1.0"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="128px" height="128px" id="RSSicon" viewBox="0 0 256 256">
<defs>
<linearGradient x1="0.085" y1="0.085" x2="0.915" y2="0.915" id="RSSg">
<stop offset="0.0" stop-color="#E3702D"/><stop offset="0.1071" stop-color="#EA7D31"/>
<stop offset="0.3503" stop-color="#F69537"/><stop offset="0.5" stop-color="#FB9E3A"/>
<stop offset="0.7016" stop-color="#EA7C31"/><stop offset="0.8866" stop-color="#DE642B"/>
<stop offset="1.0" stop-color="#D95B29"/>
</linearGradient>
</defs>
<rect width="256" height="256" rx="55" ry="55" x="0" y="0" fill="#CC5D15"/>
<rect width="246" height="246" rx="50" ry="50" x="5" y="5" fill="#F49C52"/>
<rect width="236" height="236" rx="47" ry="47" x="10" y="10" fill="url(#RSSg)"/>
<circle cx="68" cy="189" r="24" fill="#FFF"/>
<path d="M160 213h-34a82 82 0 0 0 -82 -82v-34a116 116 0 0 1 116 116z" fill="#FFF"/>
<path d="M184 213A140 140 0 0 0 44 73 V 38a175 175 0 0 1 175 175z" fill="#FFF"/>
</svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 72 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 71 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 72 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

BIN
static/images/ava.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 105 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 199 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 196 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 693 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 286 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 606 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 189 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 575 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 320 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 353 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 377 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 695 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 252 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 497 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 498 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 364 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 529 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 392 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 696 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 713 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 609 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 456 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1019 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 363 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 519 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 360 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 841 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 242 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 835 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 652 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 190 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

BIN
static/images/i3wm/lock.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 MiB

BIN
static/images/i3wm/rofi.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 163 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 80 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 115 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 96 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 185 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 292 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 252 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 229 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 272 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 545 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 254 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 240 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 261 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 412 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 610 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 552 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 422 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 528 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 973 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 420 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 478 KiB

Some files were not shown because too many files have changed in this diff Show More