<commit_before>---

- include: setup_users

# Setup dirs:
# FARE:
# main [
#   { path: "/vm" },
#   { path: "/vm/virtualbox" },
#   { path: "/data/backup" },
#   { path: "/data/tmp" },
#   { path: "/data/documents" },
#   { path: "/data/documents/ebooks" },
#   { path: "/data/graphics" },
#   { path: "/data/graphics/wallpapers" },
#   { path: "/data/audio" },
#   { path: "/data/audio/music" },
#   { path: "/data/video" },
#   { path: "/data/video/movies" },
#   { path: "/data/develop" },
#   { path: "/data/develop/projects/personal" },
#   { path: "/data/develop/projects/work" },
#   { path: "/data/develop/projects/work/yoroi" },
#   { path: "/data/develop/projects/university" },
#   { path: "/data/develop/projects/university/unibo" },
#   { path: "/data/develop/playground" },
#   { path: "/data/downloads" },
#   { path: "/data/shared" },
#   { path: "/data/shared/unsafe" }
# ].map do |h|
#   { owner: :root,
#     group: :users,
#     perms: "770",
#     allow: %i(alem0lars)
#   }.merge(h)
# end

- include: setup_system

- name: Update packages
  portage:
    package: "@world"
    update:  "yes"
    deep:    "yes"
    sync:    "yes"
  tags: sync

- name: Install basic software
  portage:
    package: "{{ item }}"
    state:   installed
    update:  "yes"
  with_items: "{{ packages.basic }}"
  tags: install

- include: setup_portage

sudo gpasswd -a alem0lars plugdev

# SSH
emerge net-misc/sshpass
sudo fizzy cfg s -C ssh -U ssh:alem0lars/configs-ssh
fizzy qi -C ssh -I ssh-alem0lars -V kate
systemctl enable --user ssh-agent.service

- include: setup_x11
- include: setup_fonts

# Tor
sudo emerge net-vpn/tor

# Hard-disk management.
sudo emerge "sys-apps/hdparm"

# Install linux miscellaneous configurations.
sudo fizzy cfg s -C linux-misc -U ssh:alem0lars/configs-linux-misc
fizzy qi -C linux-misc -I linux-misc -V kate

If there are multiple video cards
- include: setup_bumblebee

- include: setup_alsa
- include: setup_pulseaudio

- include: setup_chips

# Setup software
- include: setup_archive
- include: setup_shell
- include: setup_terminal_multiplexer
- include: setup_text_editors

# File system support
sudo emerge "sys-fs/exfat-utils"
sudo emerge "sys-fs/fuse-exfat"

# Crypted FS
sudo emerge "sys-fs/gocryptfs"

# Backup
sudo emerge "app-backup/attic"

- include: setup_web_clients
- include: setup_office
- include: setup_vcs
- include: setup_video_players
- include: setup_torrent
- include: setup_sysmon
- include: setup_ruby

# Clipboard
sudo emerge "x11-misc/unclutter"
sudo emerge "x11-apps/copyq"
sudo fizzy cfg s -C copyq -U ssh:alem0lars/configs-copyq
fizzy qi -C copyq -I copyq-alem0lars -V kate

# Commandline misc tools
sudo emerge "sys-process/parallel"
sudo emerge "app-misc/fzf"
sudo emerge "app-shells/fasd"
sudo emerge "sys-apps/pv"
sudo emerge "urlview"

# Docs -> Preview
sudo emerge "app-text/grip"
sudo emerge "app-text/restview"

# VNC
sudo emerge "net-misc/tigervnc"

# Hamachi
sudo emerge "net-vpn/logmein-hamachi"
Add `Ipc.User alem0lars` to `/var/lib/logmein-hamachi/h2-engine-override.cfg`
Add `Setup.AutoNick alem0lars` to `/var/lib/logmein-hamachi/h2-engine-override.cfg`

# Dev -> Android
emerge "dev-util/android-sdk-update-manager"
emerge "dev-util/android-tools"
gpasswd -a "alem0lars" "android" # Replace with your user.

# Dev -> Misc -> ctags
sudo emerge "dev-util/ctags"
sudo emerge "app-eselect/eselect-ctags"
sudo eselect etags set "exuberant-ctags"

# Dev -> Misc -> PhantomJS
sudo emerge "www-client/phantomjs"

# Dev -> Python
sudo emerge "app-admin/python-updater"
sudo eselect python set --python3 <your-python3-version>
sudo eselect python set --python2 <your-python2-version>
# Dev -> Python -> REPL
sudo emerge "dev-python/ipython"
# Dev -> Python -> VirtualEnv
sudo emerge "dev-python/virtualenv"
# Dev -> Python -> SciPy
sudo emerge "dev-python/scipy"
sudo emerge "dev-python/numpy"
sudo emerge "dev-python/sympy"
sudo emerge "dev-python/matplotlib"
sudo emerge "dev-python/pandas"
sudo emerge "dev-python/twisted"
# Dev -> Python -> Useful libs
sudo emerge "dev-python/python-magic"
# For additional functionality in pandas.
sudo emerge "dev-python/google-api-python-client" "dev-python/pymysql" "dev-python/python-gflags" "dev-python/psycopg:2" "dev-python/statsmodels" "dev-python/sqlalchemy"
# Dev -> Python -> Tools
sudo emerge "dev-python/pylint"

# Virtualization -> VMware player
sudo layman -a vmware
sudo emerge vmware-player
sudo emerge --config vmware-player
sudo gpasswd -a <PASSWORD> vmware
sudo systemctl enable vmware.target
# Virtualization -> VirtualBox
emerge "sys-apps/usermode-utilities" "net-misc/bridge-utils"
emerge "app-emulation/virtualbox"
emerge "app-emulation/virtualbox-modules"
emerge "app-emulation/virtualbox-extpack-oracle"
gpasswd -a <PASSWORD>s vboxusers
VBoxManage setproperty machinefolder /vm/virtualbox
# <- import the virtualbox virtual machines
# Virtualization -> Vagrant
emerge app-emulation/vagrant
vagrant plugin install vagrant-cachier
emerge app-emulation/packer
# Virtualization -> QEmu
emerge app-emulation/qemu
gpasswd -a <PASSWORD> kvm
udevadm trigger -c add /dev/kvm
emerge app-emulation/virt-manager

# Password manager
sudo emerge "app-admin/lastpass-cli"
sudo emerge "app-admin/lastpass-binary-component"

# Docs viewers
sudo emerge "app-text/zathura-meta"
sudo fizzy cfg s -C zathura -U ssh:alem0lars/configs-zathura
sudo fizzy qi -C zathura -I zathura -V kate

sudo emerge "app-text/sigil"

# Docs
sudo emerge "app-doc/phrack-all"
sudo emerge "app-doc/tldp-howto"
sudo emerge "app-doc/pms"
sudo emerge "app-portage/eclass-manpages"

# Screencasts
sudo emerge "app-misc/ttyrec"
sudo emerge "app-misc/asciinema"

# News
sudo emerge "net-news/newsbeuter"
sudo fizzy cfg s -C newsbeuter -U ssh:alem0lars/configs-newsbeuter
fizzy qi -C newsbeuter -I newsbeuter-alem0lars -V alem0lars

# Dev -> Docs
sudo emerge "dev-util/dasht"
mkdir -p ~/.local/share/dasht/docsets
# install docsets
# list of official docsets is available here: https://github.com/Kapeli/feeds
dasht-docsets-install -f android ansible apache_http_server arduino bash boost bootstrap_4 cmake css clojure common_lisp compass django docker elasticsearch elixir emmet erlang express expressionengine net_framework go groovy grunt gulp html haml handlebars haskell jade javafx javascript java_se8 jekyll jinja joomla julia latex less lodash lua_5.3 markdown mongodb mongoose nginx nodejs numpy php perl python_2 python_3 racket react redis ruby_2 sqlite svg scipy pandas rust

# Dev -> Regex tools
sudo emerge "dev-util/txt2regex"

# Dev -> R
sudo layman -a "R_Overlay"
sudo emerge "dev-lang/R"
sudo emerge "dev-lang/rstudio"

# Dev -> Julia
sudo emerge "dev-lang/julia"

# Dev -> NASM
sudo emerge "dev-lang/nasm"

# Dev -> Perl
sudo emerge "app-admin/perl-cleaner"
cpan # quando chiede il metodo da usare, scegliere `sudo`

# Signal processing
sudo emerge "net-wireless/gnuradio"

# Semantic Web
sudo emerge "dev-util/protege"

# Sec -> IDS
sudo emerge "net-analyzer/suricata"

# Sec -> SQLmap
sudo emerge "dev-db/sqlmap"

# Sec -> pwd cracking
sudo emerge "app-crypt/johntheripper"
sudo emerge "app-crypt/hashcat"

# Sec -> File formats
sudo emerge "dev-util/elfkickers"

# Sec -> Carving
sudo emerge "app-forensics/scalpel"

# Sec -> Fuzzers
sudo emerge "app-forensics/afl"
sudo emerge "app-forensics/radamsa"

# Sec -> Decompilers
sudo emerge "dev-util/dex2jar"
sudo emerge "dev-util/jd-gui-bin" # TODO: check
sudo emerge "dev-util/jad-bin"    # TODO: check

# Sec -> pentest
emerge --config "dev-db/postgresql"
systemctl enable postgresql-9.5
systemctl restart postgresql-9.5
sudo emerge "dev-db/pgadmin4"
emerge "net-analyzer/metasploit"
emerge --config "net-analyzer/metasploit"

# Network tools
sudo emerge "net-misc/ipcalc"
sudo emerge "net-misc/bridge-utils"
sudo emerge "www-client/httrack"
sudo emerge "net-dns/bind-tools"
sudo emerge "net-misc/socat"

sudo emerge "net-misc/openconnect"
sudo emerge "net-dialup/pptpclient"

# Network analyzers
sudo emerge "net-analyzer/tcpreplay"
sudo emerge "net-analyzer/tcpflow"
sudo emerge "net-analyzer/tcpdump"
sudo emerge "net-analyzer/mtr"
sudo emerge "net-analyzer/p0f"
sudo emerge "net-analyzer/tsung"
sudo emerge "net-analyzer/nmap"
sudo emerge "net-analyzer/speedtest-cli"
sudo emerge "net-analyzer/wireshark"
sudo gpasswd -a "alem0lars" "wireshark" # Replace with your username.
sudo emerge "net-analyzer/slurm"

# IRC
sudo emerge "net-irc/weechat"
sudo emerge "dev-python/websocket-client" # needed by plugin `wee_slack.py`
sudo fizzy cfg s -C weechat -U ssh:alem0lars/configs-weechat
fizzy qi -C weechat -I weechat-alem0lars -V alem0lars
# Now, after opening weechat, enter login informations:
# -> IRC
/secure passphrase <<PASSWORD>>
/secure set <server_name> <pwd>
# -> wee_slack.py
# you can generate tokens here: https://api.slack.com/docs/oauth-test-tokens
/secure set slack_token <token_for_server_a>,<token_for_server_b>,..

# Slack
sudo emerge "net-im/slack-bin"

# Image viewers
sudo emerge "media-gfx/sxiv"
sudo fizzy cfg s -C sxiv -U ssh:alem0lars/configs-sxiv
fizzy qi -C sxiv -I sxiv-alem0lars -V kate

# Image Tools
sudo emerge "media-libs/exiftool"
sudo emerge "media-gfx/scrot"
# Image Tools -> ImageOptim
sudo emerge "app-arch/advancecomp"
sudo emerge "app-arch/zopfli"
sudo emerge "media-gfx/gifsicle"
sudo emerge "media-gfx/jhead"
sudo emerge "media-gfx/jpegoptim"
sudo emerge "media-gfx/optipng"
sudo emerge "media-gfx/pngcrush"
sudo emerge "media-gfx/pngquant"
# Image Libs
sudo emerge "media-libs/opencv"

# Image Editors -> Inkscape
sudo emerge "media-gfx/inkscape"
# Image Editors -> Gimp
sudo emerge "media-gfx/gimp"
# Image Editors -> Gimp -> Plugins
sudo emerge "media-gfx/gmic"
sudo emerge "media-plugins/gimp-lqr"
sudo emerge "media-plugins/gimp-lensfun"
# Image Editors -> Others
sudo emerge "media-gfx/imagemagick"
sudo emerge "media-gfx/graphicsmagick"
#
sudo emerge "media-libs/opencv"

# Audio
# Audio -> CMUS
emerge "media-sound/cmus" "media-sound/cmusfm"
sudo fizzy cfg s -C cmus -U ssh:alem0lars/configs-cmus
fizzy qi -C cmus -I cmus-alem0lars -V kate
# Audio -> Beets
emerge "dev-python/pyxdg" "dev-python/pathlib" # deps
emerge "media-sound/beets"
sudo fizzy cfg s -C beets -U ssh:alem0lars/configs-beets
fizzy qi -C beets -I beets-alem0lars -V kate
# Now import your library:
beet import <path>

# Dict
sudo emerge "app-i18n/translate-shell"

# Voice call
sudo emerge "media-sound/mumble"

# Benchmark
sudo emerge "app-benchmarks/stress"

# Text-formatting/Diagram tools
sudo emerge "app-misc/figlet"
sudo emerge "media-gfx/plantuml"
sudo emerge "media-gfx/graphviz"
sudo emerge "app-text/pandoc"
sudo emerge "net-analyzer/bro"

# Dev -> Generic IDEs
sudo emerge "dev-java/idea"
sudo emerge "dev-util/webstorm"
sudo emerge "dev-dotnet/rider"

# Dev -> Salt
sudo emerge "app-admin/salt"

# Dev -> Docker
sudo emerge "app-emulation/docker"
sudo systemctl enable docker
sudo systemctl restart docker
sudo gpasswd -a alem0lars docker

# Dev -> JSON
sudo emerge "app-misc/jq"

# Dev -> R
sudo emerge "dev-lang/R"

# Dev -> JVM -> Java
sudo emerge "virtual/jdk"
sudo emerge "virtual/jre"
sudo emerge "dev-java/javatoolkit"
eselect java-vm set user 2
sudo eselect java-vm set system 2
# Dev -> JVM -> Scala
sudo emerge "dev-lang/scala"

# Dev -> Haskell
sudo layman -a haskell
sudo fizzy cfg s -C haskell -U ssh:alem0lars/configs-haskell
fizzy qi -C haskell -I haskell-alem0lars -V kate
sudo emerge "dev-lang/ghc"
sudo emerge "dev-haskell/stack"
sudo emerge "dev-haskell/cabal-install"
sudo emerge "app-emacs/ghc-mod"

# Dev -> Go
sudo emerge "dev-lang/go"
# TODO: Configure GOROOT and GOPATH in shell

# Dev -> C -> REPL
emerge "sci-physics/root"
# Dev -> C -> Build tools
emerge "dev-util/cmake"
# Dev -> C -> Misc tools
emerge "dev-util/strace"
emerge "dev-util/splint"
emerge "dev-util/uncrustify"
emerge "dev-util/valgrind"
emerge "dev-util/complexity"
emerge "dev-util/global"
# Dev -> C -> Libraries
emerge "dev-util/cunit"

# Dev -> NodeJS
emerge "net-libs/nodejs"
emerge "sys-apps/yarn"

# Dev -> Rust
emerge "dev-lang/rust"
emerge "dev-util/cargo"
emerge "dev-util/rust-sources"
emerge "dev-util/racer"

# Dev -> Misc
emerge "dev-util/cloc"
emerge "app-misc/colordiff"
emerge "sys-apps/the_silver_searcher"

# Debugging
sudo emerge "sys-devel/gdb"
sudo emerge "sys-devel/voltron"
sudo emerge "dev-util/radare2"
# Debugging -> Libs
sudo emerge "dev-libs/unicorn-bindings"
sudo emerge "dev-libs/capstone"

# Files Sharing
sudo emerge "www-servers/pshs"

# Files sync
sudo emerge "net-misc/drive"
sudo emerge "net-misc/megatools"
sudo emerge "net-misc/megasync"

# GTD
sudo emerge "app-misc/task"
sudo emerge "dev-python/tasklib"
sudo fizzy cfg s -C taskwarrior -U ssh:alem0lars/configs-taskwarrior
fizzy qi -C taskwarrior -I taskwarrior-alem0lars -V alem0lars-linux

# Files Management
sudo emerge "app-misc/tmsu"
cd ~ && tmsu init && mv ~/.tmsu/db ~/.tmsu/default.db
sudo emerge "app-text/tree"
sudo emerge "app-misc/watchman"
sudo emerge "sys-fs/ncdu"
sudo emerge "app-misc/wipe"
sudo emerge "app-misc/ranger"
sudo fizzy cfg s -C ranger -U ssh:alem0lars/configs-ranger
fizzy qi -C ranger -I ranger-alem0lars -V alem0lars-linux
# Needed by ranger.
sudo emerge "media-libs/libcaca"
sudo emerge "dev-python/pygments"

# Pastebin
emerge wgetpaste

# Electronics
sudo emerge "sci-electronics/quartus-prime-lite"
sudo emerge "sci-electronics/eagle"

# Email
sudo emerge "mail-client/thunderbird"

# FTP
sudo emerge "net-ftp/lftp"
sudo emerge "net-ftp/filezilla"

# Cups
sudo emerge "net-print/cups"
sudo emerge "net-print/gutenprint"
sudo emerge "media-gfx/xsane"
sudo gpasswd -a alem0lars lp
sudo gpasswd -a alem0lars lpadmin
sudo systemctl enable cups
sudo systemctl restart cups

# Screensaver
sudo emerge "x11-misc/slock"
sudo emerge "app-misc/vlock"

# Redis
sudo emerge "dev-db/redis"

# TeamViewer
sudo emerge "app-misc/teamviewer"

# RDP
sudo emerge "net-misc/freerdp"

sudo emerge "sysstat"

sudo emerge "pyrenamer"

sudo emerge audacity

sudo emerge "dev-vcs/mr"
sudo fizzy cfg s -C myrepos -U alem0lars/configs-myrepos
fizzy qi -C myrepos -V kate -I myrepos-alem0lars

sudo emerge traceroute

# Install jdownloader manually into /opt/jdownloader using installer

install foxitreader and link to /usr/local/bin using installer from download site

sudo emerge telegram-desktop-bin

sudo emerge "app-text/xournal"

sudo emerge "playerctl"

sudo emerge "xev"

sudo emerge "maven-bin"

sudo emerge "udftools"

sudo emerge "burpsuite"

sudo emerge "alacritty"
fizzy qi -C alacritty -V kate -I alacritty-alem0lars

sudo emerge "ltrace"

# Tools to work with cgroups
sudo emerge "libcgroup"

# [OPTIONAL] Nitrokey
sudo emerge "app-crypt/nitrokey-app"

# [OPTIONAL] Citrix
sudo emerge "net-misc/icaclient"
sudo fizzy cfg s -C citrix -U ssh:alem0lars/configs-citrix
fizzy qi -C citrix -I citrix-alem0lars -V kate

# Create control group for management tasks:
sudo cgcreate -g memory,cpu:mgmt
sudo cgset -r cpu.shares=128 mgmt
sudo cgset -r memory.limit_in_bytes=536870912 mgmt
# Now to emerge: sudo cgexec -g cpu,memory:mgmt emerge ...

sudo emerge app-mobilephone/dfu-util

# Work with smartcards
sudo emerge opensc

sudo emerge dfu-programmer

sudo emerge arandr

sudo emerge net-wireless/iw

sudo emerge virtual/wine wine-staging
# Adjust for hidpi
# Run
# $ winecfg
# and change the "dpi" setting found in the "Graphics" tab. This only affects the font size.

# Enterprise Architect
winetricks msxml3
winetricks msxml4
winetricks mdac28
winetricks jet40
wine msiexec /i Setup.exe

sudo npm i -g nativefier

# Todoist
wget https://d3ptyyxy2at9ui.cloudfront.net/bab0a0c4b1c3135a24bd0518417b66e3.png
mv bab0a0c4b1c3135a24bd0518417b66e3.png todoist.png
nativefier -p linux -n todoist --disable-dev-tools --single-instance --disable-gpu-sandbox --zoom 1.0 --tray --icon todoist.png --disable-context-menu https://todoist.com/app
rm todoist.png
sudo mv todoist-linux-x64 /usr/local/opt/todoist
sudo ln -s /usr/local/opt/todoist/todoist /usr/local/bin

# Notion
wget https://www.notion.so/images/logo-ios.png
mv logo-ios.png notion.png
nativefier -p linux -n notion --disable-dev-tools --single-instance --disable-gpu-sandbox --zoom 1.0 --tray --icon notion.png --disable-context-menu https://www.notion.so/alem0lars
rm notion.png
sudo mv notion-linux-x64 /usr/local/opt/notion
sudo ln -s /usr/local/opt/notion/notion /usr/local/bin

# Trello
nativefier -p linux -n trello --disable-dev-tools --tray --single-instance --disable-gpu-sandbox --zoom 0.7 https://trello.com
sudo mv trello-linux-x64 /usr/local/opt/trello
sudo ln -s /usr/local/opt/trello/trello /usr/local/bin

# WhatsApp
nativefier -p linux -n whatsapp --disable-dev-tools --tray --single-instance --disable-gpu-sandbox --zoom 1.0 https://web.whatsapp.com
sudo mv whatsapp-linux-x64 /usr/local/opt/whatsapp
sudo ln -s /usr/local/opt/whatsapp/whatsapp /usr/local/bin

# Facebook
nativefier -p linux -n facebook --disable-dev-tools --tray --single-instance --disable-gpu-sandbox --zoom 1.0 https://facebook.com
sudo mv facebook-linux-x64 /usr/local/opt/facebook
sudo ln -s /usr/local/opt/facebook/facebook /usr/local/bin

# Inoreader
nativefier -p linux -n inoreader --disable-dev-tools --tray --single-instance --disable-gpu-sandbox --zoom 1.0 https://www.inoreader.com/dashboard
sudo mv facebook-linux-x64 /usr/local/opt/facebook
sudo ln -s /usr/local/opt/facebook/facebook /usr/local/bin
<commit_msg>update instructions for inoreader, facebook<commit_after>---

- include: setup_users

# Setup dirs:
# FARE:
# main [
#   { path: "/vm" },
#   { path: "/vm/virtualbox" },
#   { path: "/data/backup" },
#   { path: "/data/tmp" },
#   { path: "/data/documents" },
#   { path: "/data/documents/ebooks" },
#   { path: "/data/graphics" },
#   { path: "/data/graphics/wallpapers" },
#   { path: "/data/audio" },
#   { path: "/data/audio/music" },
#   { path: "/data/video" },
#   { path: "/data/video/movies" },
#   { path: "/data/develop" },
#   { path: "/data/develop/projects/personal" },
#   { path: "/data/develop/projects/work" },
#   { path: "/data/develop/projects/work/yoroi" },
#   { path: "/data/develop/projects/university" },
#   { path: "/data/develop/projects/university/unibo" },
#   { path: "/data/develop/playground" },
#   { path: "/data/downloads" },
#   { path: "/data/shared" },
#   { path: "/data/shared/unsafe" }
# ].map do |h|
#   { owner: :root,
#     group: :users,
#     perms: "770",
#     allow: %i(alem0lars)
#   }.merge(h)
# end

- include: setup_system

- name: Update packages
  portage:
    package: "@world"
    update:  "yes"
    deep:    "yes"
    sync:    "yes"
  tags: sync

- name: Install basic software
  portage:
    package: "{{ item }}"
    state:   installed
    update:  "yes"
  with_items: "{{ packages.basic }}"
  tags: install

- include: setup_portage

sudo gpasswd -a alem0lars plug<PASSWORD>

# SSH
emerge net-misc/sshpass
sudo fizzy cfg s -C ssh -U ssh:alem0lars/configs-ssh
fizzy qi -C ssh -I ssh-alem0lars -V kate
systemctl enable --user ssh-agent.service

- include: setup_x11
- include: setup_fonts

# Tor
sudo emerge net-vpn/tor

# Hard-disk management.
sudo emerge "sys-apps/hdparm"

# Install linux miscellaneous configurations.
sudo fizzy cfg s -C linux-misc -U ssh:alem0lars/configs-linux-misc
fizzy qi -C linux-misc -I linux-misc -V kate

If there are multiple video cards
- include: setup_bumblebee

- include: setup_alsa
- include: setup_pulseaudio

- include: setup_chips

# Setup software
- include: setup_archive
- include: setup_shell
- include: setup_terminal_multiplexer
- include: setup_text_editors

# File system support
sudo emerge "sys-fs/exfat-utils"
sudo emerge "sys-fs/fuse-exfat"

# Crypted FS
sudo emerge "sys-fs/gocryptfs"

# Backup
sudo emerge "app-backup/attic"

- include: setup_web_clients
- include: setup_office
- include: setup_vcs
- include: setup_video_players
- include: setup_torrent
- include: setup_sysmon
- include: setup_ruby

# Clipboard
sudo emerge "x11-misc/unclutter"
sudo emerge "x11-apps/copyq"
sudo fizzy cfg s -C copyq -U ssh:alem0lars/configs-copyq
fizzy qi -C copyq -I copyq-alem0lars -V kate

# Commandline misc tools
sudo emerge "sys-process/parallel"
sudo emerge "app-misc/fzf"
sudo emerge "app-shells/fasd"
sudo emerge "sys-apps/pv"
sudo emerge "urlview"

# Docs -> Preview
sudo emerge "app-text/grip"
sudo emerge "app-text/restview"

# VNC
sudo emerge "net-misc/tigervnc"

# Hamachi
sudo emerge "net-vpn/logmein-hamachi"
Add `Ipc.User alem0lars` to `/var/lib/logmein-hamachi/h2-engine-override.cfg`
Add `Setup.AutoNick alem0lars` to `/var/lib/logmein-hamachi/h2-engine-override.cfg`

# Dev -> Android
emerge "dev-util/android-sdk-update-manager"
emerge "dev-util/android-tools"
gpasswd -a "alem0lars" "android" # Replace with your user.

# Dev -> Misc -> ctags
sudo emerge "dev-util/ctags"
sudo emerge "app-eselect/eselect-ctags"
sudo eselect etags set "exuberant-ctags"

# Dev -> Misc -> PhantomJS
sudo emerge "www-client/phantomjs"

# Dev -> Python
sudo emerge "app-admin/python-updater"
sudo eselect python set --python3 <your-python3-version>
sudo eselect python set --python2 <your-python2-version>
# Dev -> Python -> REPL
sudo emerge "dev-python/ipython"
# Dev -> Python -> VirtualEnv
sudo emerge "dev-python/virtualenv"
# Dev -> Python -> SciPy
sudo emerge "dev-python/scipy"
sudo emerge "dev-python/numpy"
sudo emerge "dev-python/sympy"
sudo emerge "dev-python/matplotlib"
sudo emerge "dev-python/pandas"
sudo emerge "dev-python/twisted"
# Dev -> Python -> Useful libs
sudo emerge "dev-python/python-magic"
# For additional functionality in pandas.
sudo emerge "dev-python/google-api-python-client" "dev-python/pymysql" "dev-python/python-gflags" "dev-python/psycopg:2" "dev-python/statsmodels" "dev-python/sqlalchemy"
# Dev -> Python -> Tools
sudo emerge "dev-python/pylint"

# Virtualization -> VMware player
sudo layman -a vmware
sudo emerge vmware-player
sudo emerge --config vmware-player
sudo gpasswd -a alem0<PASSWORD>s vmware
sudo systemctl enable vmware.target
# Virtualization -> VirtualBox
emerge "sys-apps/usermode-utilities" "net-misc/bridge-utils"
emerge "app-emulation/virtualbox"
emerge "app-emulation/virtualbox-modules"
emerge "app-emulation/virtualbox-extpack-oracle"
gpasswd -a alem0lars vboxusers
VBoxManage setproperty machinefolder /vm/virtualbox
# <- import the virtualbox virtual machines
# Virtualization -> Vagrant
emerge app-emulation/vagrant
vagrant plugin install vagrant-cachier
emerge app-emulation/packer
# Virtualization -> QEmu
emerge app-emulation/qemu
gpasswd -a alem0lars kvm
udevadm trigger -c add /dev/kvm
emerge app-emulation/virt-manager

# Password manager
sudo emerge "app-admin/lastpass-cli"
sudo emerge "app-admin/lastpass-binary-component"

# Docs viewers
sudo emerge "app-text/zathura-meta"
sudo fizzy cfg s -C zathura -U ssh:alem0lars/configs-zathura
sudo fizzy qi -C zathura -I zathura -V kate

sudo emerge "app-text/sigil"

# Docs
sudo emerge "app-doc/phrack-all"
sudo emerge "app-doc/tldp-howto"
sudo emerge "app-doc/pms"
sudo emerge "app-portage/eclass-manpages"

# Screencasts
sudo emerge "app-misc/ttyrec"
sudo emerge "app-misc/asciinema"

# News
sudo emerge "net-news/newsbeuter"
sudo fizzy cfg s -C newsbeuter -U ssh:alem0lars/configs-newsbeuter
fizzy qi -C newsbeuter -I newsbeuter-alem0lars -V alem0lars

# Dev -> Docs
sudo emerge "dev-util/dasht"
mkdir -p ~/.local/share/dasht/docsets
# install docsets
# list of official docsets is available here: https://github.com/Kapeli/feeds
dasht-docsets-install -f android ansible apache_http_server arduino bash boost bootstrap_4 cmake css clojure common_lisp compass django docker elasticsearch elixir emmet erlang express expressionengine net_framework go groovy grunt gulp html haml handlebars haskell jade javafx javascript java_se8 jekyll jinja joomla julia latex less lodash lua_5.3 markdown mongodb mongoose nginx nodejs numpy php perl python_2 python_3 racket react redis ruby_2 sqlite svg scipy pandas rust

# Dev -> Regex tools
sudo emerge "dev-util/txt2regex"

# Dev -> R
sudo layman -a "R_Overlay"
sudo emerge "dev-lang/R"
sudo emerge "dev-lang/rstudio"

# Dev -> Julia
sudo emerge "dev-lang/julia"

# Dev -> NASM
sudo emerge "dev-lang/nasm"

# Dev -> Perl
sudo emerge "app-admin/perl-cleaner"
cpan # quando chiede il metodo da usare, scegliere `sudo`

# Signal processing
sudo emerge "net-wireless/gnuradio"

# Semantic Web
sudo emerge "dev-util/protege"

# Sec -> IDS
sudo emerge "net-analyzer/suricata"

# Sec -> SQLmap
sudo emerge "dev-db/sqlmap"

# Sec -> pwd cracking
sudo emerge "app-crypt/johntheripper"
sudo emerge "app-crypt/hashcat"

# Sec -> File formats
sudo emerge "dev-util/elfkickers"

# Sec -> Carving
sudo emerge "app-forensics/scalpel"

# Sec -> Fuzzers
sudo emerge "app-forensics/afl"
sudo emerge "app-forensics/radamsa"

# Sec -> Decompilers
sudo emerge "dev-util/dex2jar"
sudo emerge "dev-util/jd-gui-bin" # TODO: check
sudo emerge "dev-util/jad-bin"    # TODO: check

# Sec -> pentest
emerge --config "dev-db/postgresql"
systemctl enable postgresql-9.5
systemctl restart postgresql-9.5
sudo emerge "dev-db/pgadmin4"
emerge "net-analyzer/metasploit"
emerge --config "net-analyzer/metasploit"

# Network tools
sudo emerge "net-misc/ipcalc"
sudo emerge "net-misc/bridge-utils"
sudo emerge "www-client/httrack"
sudo emerge "net-dns/bind-tools"
sudo emerge "net-misc/socat"

sudo emerge "net-misc/openconnect"
sudo emerge "net-dialup/pptpclient"

# Network analyzers
sudo emerge "net-analyzer/tcpreplay"
sudo emerge "net-analyzer/tcpflow"
sudo emerge "net-analyzer/tcpdump"
sudo emerge "net-analyzer/mtr"
sudo emerge "net-analyzer/p0f"
sudo emerge "net-analyzer/tsung"
sudo emerge "net-analyzer/nmap"
sudo emerge "net-analyzer/speedtest-cli"
sudo emerge "net-analyzer/wireshark"
sudo gpasswd -a "alem0lars" "<PASSWORD>" # Replace with your username.
sudo emerge "net-analyzer/slurm"

# IRC
sudo emerge "net-irc/weechat"
sudo emerge "dev-python/websocket-client" # needed by plugin `wee_slack.py`
sudo fizzy cfg s -C weechat -U ssh:alem0lars/configs-weechat
fizzy qi -C weechat -I weechat-alem0lars -V alem0lars
# Now, after opening weechat, enter login informations:
# -> IRC
/secure passphrase <<PASSWORD>>
/secure set <server_name> <pwd>
# -> wee_slack.py
# you can generate tokens here: https://api.slack.com/docs/oauth-test-tokens
/secure set slack_token <token_for_server_a>,<token_for_server_b>,..

# Slack
sudo emerge "net-im/slack-bin"

# Image viewers
sudo emerge "media-gfx/sxiv"
sudo fizzy cfg s -C sxiv -U ssh:alem0lars/configs-sxiv
fizzy qi -C sxiv -I sxiv-alem0lars -V kate

# Image Tools
sudo emerge "media-libs/exiftool"
sudo emerge "media-gfx/scrot"
# Image Tools -> ImageOptim
sudo emerge "app-arch/advancecomp"
sudo emerge "app-arch/zopfli"
sudo emerge "media-gfx/gifsicle"
sudo emerge "media-gfx/jhead"
sudo emerge "media-gfx/jpegoptim"
sudo emerge "media-gfx/optipng"
sudo emerge "media-gfx/pngcrush"
sudo emerge "media-gfx/pngquant"
# Image Libs
sudo emerge "media-libs/opencv"

# Image Editors -> Inkscape
sudo emerge "media-gfx/inkscape"
# Image Editors -> Gimp
sudo emerge "media-gfx/gimp"
# Image Editors -> Gimp -> Plugins
sudo emerge "media-gfx/gmic"
sudo emerge "media-plugins/gimp-lqr"
sudo emerge "media-plugins/gimp-lensfun"
# Image Editors -> Others
sudo emerge "media-gfx/imagemagick"
sudo emerge "media-gfx/graphicsmagick"
#
sudo emerge "media-libs/opencv"

# Audio
# Audio -> CMUS
emerge "media-sound/cmus" "media-sound/cmusfm"
sudo fizzy cfg s -C cmus -U ssh:alem0lars/configs-cmus
fizzy qi -C cmus -I cmus-alem0lars -V kate
# Audio -> Beets
emerge "dev-python/pyxdg" "dev-python/pathlib" # deps
emerge "media-sound/beets"
sudo fizzy cfg s -C beets -U ssh:alem0lars/configs-beets
fizzy qi -C beets -I beets-alem0lars -V kate
# Now import your library:
beet import <path>

# Dict
sudo emerge "app-i18n/translate-shell"

# Voice call
sudo emerge "media-sound/mumble"

# Benchmark
sudo emerge "app-benchmarks/stress"

# Text-formatting/Diagram tools
sudo emerge "app-misc/figlet"
sudo emerge "media-gfx/plantuml"
sudo emerge "media-gfx/graphviz"
sudo emerge "app-text/pandoc"
sudo emerge "net-analyzer/bro"

# Dev -> Generic IDEs
sudo emerge "dev-java/idea"
sudo emerge "dev-util/webstorm"
sudo emerge "dev-dotnet/rider"

# Dev -> Salt
sudo emerge "app-admin/salt"

# Dev -> Docker
sudo emerge "app-emulation/docker"
sudo systemctl enable docker
sudo systemctl restart docker
sudo gpasswd -a alem0lars docker

# Dev -> JSON
sudo emerge "app-misc/jq"

# Dev -> R
sudo emerge "dev-lang/R"

# Dev -> JVM -> Java
sudo emerge "virtual/jdk"
sudo emerge "virtual/jre"
sudo emerge "dev-java/javatoolkit"
eselect java-vm set user 2
sudo eselect java-vm set system 2
# Dev -> JVM -> Scala
sudo emerge "dev-lang/scala"

# Dev -> Haskell
sudo layman -a haskell
sudo fizzy cfg s -C haskell -U ssh:alem0lars/configs-haskell
fizzy qi -C haskell -I haskell-alem0lars -V kate
sudo emerge "dev-lang/ghc"
sudo emerge "dev-haskell/stack"
sudo emerge "dev-haskell/cabal-install"
sudo emerge "app-emacs/ghc-mod"

# Dev -> Go
sudo emerge "dev-lang/go"
# TODO: Configure GOROOT and GOPATH in shell

# Dev -> C -> REPL
emerge "sci-physics/root"
# Dev -> C -> Build tools
emerge "dev-util/cmake"
# Dev -> C -> Misc tools
emerge "dev-util/strace"
emerge "dev-util/splint"
emerge "dev-util/uncrustify"
emerge "dev-util/valgrind"
emerge "dev-util/complexity"
emerge "dev-util/global"
# Dev -> C -> Libraries
emerge "dev-util/cunit"

# Dev -> NodeJS
emerge "net-libs/nodejs"
emerge "sys-apps/yarn"

# Dev -> Rust
emerge "dev-lang/rust"
emerge "dev-util/cargo"
emerge "dev-util/rust-sources"
emerge "dev-util/racer"

# Dev -> Misc
emerge "dev-util/cloc"
emerge "app-misc/colordiff"
emerge "sys-apps/the_silver_searcher"

# Debugging
sudo emerge "sys-devel/gdb"
sudo emerge "sys-devel/voltron"
sudo emerge "dev-util/radare2"
# Debugging -> Libs
sudo emerge "dev-libs/unicorn-bindings"
sudo emerge "dev-libs/capstone"

# Files Sharing
sudo emerge "www-servers/pshs"

# Files sync
sudo emerge "net-misc/drive"
sudo emerge "net-misc/megatools"
sudo emerge "net-misc/megasync"

# GTD
sudo emerge "app-misc/task"
sudo emerge "dev-python/tasklib"
sudo fizzy cfg s -C taskwarrior -U ssh:alem0lars/configs-taskwarrior
fizzy qi -C taskwarrior -I taskwarrior-alem0lars -V alem0lars-linux

# Files Management
sudo emerge "app-misc/tmsu"
cd ~ && tmsu init && mv ~/.tmsu/db ~/.tmsu/default.db
sudo emerge "app-text/tree"
sudo emerge "app-misc/watchman"
sudo emerge "sys-fs/ncdu"
sudo emerge "app-misc/wipe"
sudo emerge "app-misc/ranger"
sudo fizzy cfg s -C ranger -U ssh:alem0lars/configs-ranger
fizzy qi -C ranger -I ranger-alem0lars -V alem0lars-linux
# Needed by ranger.
sudo emerge "media-libs/libcaca"
sudo emerge "dev-python/pygments"

# Pastebin
emerge wgetpaste

# Electronics
sudo emerge "sci-electronics/quartus-prime-lite"
sudo emerge "sci-electronics/eagle"

# Email
sudo emerge "mail-client/thunderbird"

# FTP
sudo emerge "net-ftp/lftp"
sudo emerge "net-ftp/filezilla"

# Cups
sudo emerge "net-print/cups"
sudo emerge "net-print/gutenprint"
sudo emerge "media-gfx/xsane"
sudo gpasswd -a alem0lars lp
sudo gpasswd -a alem0lars lpadmin
sudo systemctl enable cups
sudo systemctl restart cups

# Screensaver
sudo emerge "x11-misc/slock"
sudo emerge "app-misc/vlock"

# Redis
sudo emerge "dev-db/redis"

# TeamViewer
sudo emerge "app-misc/teamviewer"

# RDP
sudo emerge "net-misc/freerdp"

sudo emerge "sysstat"

sudo emerge "pyrenamer"

sudo emerge audacity

sudo emerge "dev-vcs/mr"
sudo fizzy cfg s -C myrepos -U alem0lars/configs-myrepos
fizzy qi -C myrepos -V kate -I myrepos-alem0lars

sudo emerge traceroute

# Install jdownloader manually into /opt/jdownloader using installer

install foxitreader and link to /usr/local/bin using installer from download site

sudo emerge telegram-desktop-bin

sudo emerge "app-text/xournal"

sudo emerge "playerctl"

sudo emerge "xev"

sudo emerge "maven-bin"

sudo emerge "udftools"

sudo emerge "burpsuite"

sudo emerge "alacritty"
fizzy qi -C alacritty -V kate -I alacritty-alem0lars

sudo emerge "ltrace"

# Tools to work with cgroups
sudo emerge "libcgroup"

# [OPTIONAL] Nitrokey
sudo emerge "app-crypt/nitrokey-app"

# [OPTIONAL] Citrix
sudo emerge "net-misc/icaclient"
sudo fizzy cfg s -C citrix -U ssh:alem0lars/configs-citrix
fizzy qi -C citrix -I citrix-alem0lars -V kate

# Create control group for management tasks:
sudo cgcreate -g memory,cpu:mgmt
sudo cgset -r cpu.shares=128 mgmt
sudo cgset -r memory.limit_in_bytes=536870912 mgmt
# Now to emerge: sudo cgexec -g cpu,memory:mgmt emerge ...

sudo emerge app-mobilephone/dfu-util

# Work with smartcards
sudo emerge opensc

sudo emerge dfu-programmer

sudo emerge arandr

sudo emerge net-wireless/iw

sudo emerge virtual/wine wine-staging
# Adjust for hidpi
# Run
# $ winecfg
# and change the "dpi" setting found in the "Graphics" tab. This only affects the font size.

# Enterprise Architect
winetricks msxml3
winetricks msxml4
winetricks mdac28
winetricks jet40
wine msiexec /i Setup.exe

sudo npm i -g nativefier

# Notion
wget https://www.notion.so/images/logo-ios.png
mv logo-ios.png notion.png
nativefier -p linux -n notion --disable-dev-tools --single-instance --disable-gpu-sandbox --zoom 1.0 --tray --icon notion.png --disable-context-menu https://www.notion.so/alem0lars
rm notion.png
sudo mv notion-linux-x64 /usr/local/opt/notion
sudo ln -s /usr/local/opt/notion/notion /usr/local/bin

# Trello
nativefier -p linux -n trello --disable-dev-tools --tray --single-instance --disable-gpu-sandbox --zoom 0.7 https://trello.com
sudo mv trello-linux-x64 /usr/local/opt/trello
sudo ln -s /usr/local/opt/trello/trello /usr/local/bin

# WhatsApp
nativefier -p linux -n whatsapp --disable-dev-tools --tray --single-instance --disable-gpu-sandbox --zoom 1.0 --icon whatsapp.png https://web.whatsapp.com
rm whatsapp.png
sudo mv whatsapp-linux-x64 /usr/local/opt/whatsapp
sudo ln -s /usr/local/opt/whatsapp/whatsapp /usr/local/bin

# Facebook
wget https://upload.wikimedia.org/wikipedia/commons/c/c2/F_icon.svg -O facebook.svg
nativefier -p linux -n facebook --disable-dev-tools --tray --single-instance --disable-gpu-sandbox --zoom 1.0 --icon facebook.svg https://facebook.com
rm facebook.svg
sudo mv facebook-linux-x64 /usr/local/opt/facebook
sudo ln -s /usr/local/opt/facebook/facebook /usr/local/bin

# Inoreader
wget https://www.inoreader.com/images/icons/xapple-touch-ipad-retina.png.pagespeed.ic.qD9y5WTgZ1.png -O inoreader.png
nativefier -p linux -n inoreader --disable-dev-tools --tray --single-instance --disable-gpu-sandbox --zoom 1.0 --icon inoreader.png https://www.inoreader.com/dashboard
sudo mv inoreader-linux-x64 /usr/local/opt/inoreader
sudo ln -s /usr/local/opt/inoreader/inoreader /usr/local/bin

{'fraction_non_alphanumeric': 0.12159625768819843, 'fraction_numerical': 0.008316248447922382, 'mean_word_length': 4.061677871967261, 'pattern_counts': {'":': 0, '<': 29, '<?xml version=': 0, '>': 163, 'https://': 20, 'lorem ipsum': 0, 'www.': 13, 'xml': 4}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 10, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4871649', 'n_tokens_mistral': 13900, 'n_tokens_neox': 12896, 'n_words': 3498}