<commit_before>=====
Hanzō
=====

    | <NAME>: You must have big rats if you need <NAME>'s steel.
    | The Bride: ...Huge.

Quick start guide
-----------------

This is an `Ansible`_ playbook that configures a new ArchLinux installation with some development tools.
The easiest way to configure your system with this Ansible script, is to launch the automatic installer::

    $ sh <(curl -L http://j.mp/hattori-hanzo)

A clean ArchLinux installation is recommended but not required. Anyway, **bear in mind** that this configuration
**will overwrite** your settings.

.. _Ansible: https://www.ansible.com/

Manual installation
-------------------

If you prefer a manual installation because you don't trust *hidden* scripts (and you should never trust hidden scripts),
you have to install ``ansible`` and ``git`` packages using the ArchLinux default package manager (``pacman``). Simply, launch::

	$ pacman -S ansible git

Starting the orchestration
~~~~~~~~~~~~~~~~~~~~~~~~~~

Clone this repository and start the orchestration with::

	$ git clone https://github.com/palazzem/ansible-devel.git
	$ ansible-playbook orchestrate.yml -i inventory --connection=local -e "fullname=<name> username=<name> email=<email>"

The command above, requires the following parameters:

* ``fullname`` is used inside the ``.gitconfig.j2`` template
* ``email`` is used inside the ``.gitconfig.j2`` template
* ``username`` is the name for the created user

**NOTE:** These parameters are mandatory and if you don't provide any value, the Ansible script will not proceed with
the orchestration.

Ansible roles
-------------

The main script will go through the following roles:

* ``system``
* ``shell``
* ``vm``
* ``provisioning``
* ``postgresql``
* ``redis``
* ``development``
* ``extras``
* ``editors``
* ``bspwm``
* ``fonts``
* ``dotfiles``

When the orchestration is completed, remember to set the user password through::

    $ passwd <username>

Then you can reboot your system.

Other tools
-----------

The Ansible script doesn't provide any extra tool or applications like IDEs, browsers, or Android SDK/NDK that I use
regularly. Even if it's possible to orchestrate manual installations (for instance: wget the archive, untar, create
applications shortcuts), I prefer to use the AUR repositories that take care of everything. Anyway, it's never a good
idea to install packages from AUR repositories without looking at the ``PKGBUILD`` file, so I leave the installation
to the snippet below::

    # window manager (required)
    $ yaourt -S xdo-git lemonbar-xft-git sutils-git

    # generic stuff
    $ yaourt -S downgrade
    $ yaourt -S mbpfan-git # (optional for Macbook laptops)

    # browsers
    $ yaourt -S firefox-developer google-chrome

    # terminal
    $ yaourt -S rxvt-unicode-256xresources urxvt-perls urxvt-resize-font-git urxvt-vtwheel

    # fonts
    $ yaourt -S ttf-ms-fonts ttf-font-awesome infinality-bundle
    $ fc-cache -fr

    # audio manager
    $ yaourt -S mopidy-spotify

    # Android
    $ yaourt -S gradle android-sdk android-sdk-platform-tools android-sdk-build-tools android-platform
    $ yaourt -S --tmp ~/ android-ndk

**NOTES:**

* ``ttf-ms-fonts`` is used to solve some rendering problems related to ``awesome`` window manager
* ``infinality-bundle`` requires adding a new key to Pacman KEYRING. you can find further information in the
  `Infinality official page`_
* ``mbpfan-git`` could be useful only if you install this system in a Macbook notebook
* the ``android-sdk`` package places the Android SDK in ``/opt/android-sdk`` so only the ``root`` user can add
  new SDK platforms. Bear in mind that you can follow these `recommendations`_ to properly configure your SDK
  folder. Furthermore, the ``android-ndk`` installation requires a lot of ``/tmp`` free space and if your
  configuration doesn't fulfill this requirement, you may provide the ``--tmp`` option and build the NDK in
  your home folder.

.. _Infinality official page: https://wiki.archlinux.org/index.php/Infinality#Infinality-bundle
.. _recommendations: https://wiki.archlinux.org/index.php/android#Android_development<commit_msg>better README to make people aware of curlbombs<commit_after>=====
Hanzō
=====

    | Hattori Hanzō: You must have big rats if you need Hattori Hanzo's steel.
    | The Bride: ...Huge.

Quick start guide
-----------------

This is an `Ansible`_ playbook that configures a new ArchLinux installation with some development tools.
If you like living on the bleeding edge and *curlbombs* don't scare you, the automatic installer is the easiest
way to configure your system with this playbook::

    $ sh <(curl -L http://j.mp/hattori-hanzo)

A clean ArchLinux installation is recommended but not required. Anyway, **bear in mind** that this configuration
**will overwrite your system**.

.. _Ansible: https://www.ansible.com/

Manual installation
-------------------

If you prefer a manual installation because you don't like *curlbombs* (and you shouldn't), you have to install ``ansible`` and
``git`` packages using the ArchLinux default package manager (``pacman``). Simply, launch::

    $ pacman -S ansible git base base-devel

Starting the orchestration
~~~~~~~~~~~~~~~~~~~~~~~~~~

Clone this repository and start the orchestration with::

    $ git clone https://github.com/palazzem/ansible-devel.git
    $ ansible-playbook orchestrate.yml -i inventory --connection=local -e "fullname=<name> username=<name> email=<email>"

The command above, requires the following parameters:

* ``fullname`` is used inside the ``.gitconfig.j2`` template
* ``email`` is used inside the ``.gitconfig.j2`` template
* ``username`` is the name for the created user

**NOTE:** These parameters are mandatory and if you don't provide any value, the Ansible playbook will not proceed with
the orchestration.

Ansible roles
-------------

The playbook will go through the following roles:

* ``system``
* ``shell``
* ``vm``
* ``provisioning``
* ``postgresql``
* ``redis``
* ``development``
* ``extras``
* ``editors``
* ``bspwm``
* ``fonts``
* ``dotfiles``

When the orchestration is completed, remember to set the user password through::

    $ passwd <username>

Then you can reboot your system.

Other tools
-----------

The Ansible playbook doesn't provide any extra tool or applications like IDEs, browsers, or Android SDK/NDK that I use
regularly. Even if it's possible to orchestrate manual installations (for instance: wget the archive, untar, create
applications shortcuts), I prefer to use the AUR repositories that take care of everything. Anyway, it's never a good
idea installing packages from AUR repositories without looking at the ``PKGBUILD`` file, so I leave the last setup
to the snippet below::

    # window manager (required)
    $ yaourt -S xdo-git lemonbar-xft-git sutils-git

    # generic stuff
    $ yaourt -S downgrade
    $ yaourt -S mbpfan-git # (optional for Macbook laptops)

    # browsers
    $ yaourt -S firefox-developer google-chrome

    # terminal
    $ yaourt -S rxvt-unicode-256xresources urxvt-perls urxvt-resize-font-git urxvt-vtwheel

    # fonts
    $ yaourt -S ttf-ms-fonts ttf-font-awesome infinality-bundle
    $ fc-cache -fr

    # audio manager
    $ yaourt -S mopidy-spotify

    # Android
    $ yaourt -S gradle android-sdk android-sdk-platform-tools android-sdk-build-tools android-platform
    $ yaourt -S --tmp ~/ android-ndk

**NOTES:**

* ``ttf-ms-fonts`` is used to solve some rendering problems related to window manager
* ``infinality-bundle`` requires adding a new key to Pacman KEYRING. you can find further information in the
  `Infinality official page`_
* ``mbpfan-git`` could be useful only if you install this system in a Macbook notebook
* the ``android-sdk`` package places the Android SDK in ``/opt/android-sdk`` so only the ``root`` user can add
  new SDK platforms. Bear in mind that you can follow these `recommendations`_ to properly configure your SDK
  folder. Furthermore, the ``android-ndk`` installation requires a lot of ``/tmp`` free space and if your
  configuration doesn't fulfill this requirement, you may provide the ``--tmp`` option and build the NDK in
  your home folder.

.. _Infinality official page: https://wiki.archlinux.org/index.php/Infinality#Infinality-bundle
.. _recommendations: https://wiki.archlinux.org/index.php/android#Android_development
{'fraction_non_alphanumeric': 0.1182731403970342, 'fraction_numerical': 0.001195886151638364, 'mean_word_length': 3.8146229130685088, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 13, 'https://': 8, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1712199', 'n_tokens_mistral': 2489, 'n_tokens_neox': 2334, 'n_words': 993}