| " vim settings | |
| set scrolloff=5 | |
| set history=1000 | |
| set clipboard+=unnamedplus | |
| " status bar | |
| set showmode | |
| " leader | |
| map <space> <nop> |
run it like this:
php factureaza_total_to_price.php --api_key=yourapikey123 --prefix=asdf --counter_start=1 --counter_end=2
This script will change the vat_type to 1, which means "TVA implicit (fără TVA special)", for every invoice within the specified series and counter range (between start and end). It will also take the total value and replace the price with that total.
| # Completely remove any previous config | |
| sudo apt remove --purge mysql* | |
| sudo apt autoremove | |
| sudo find / -iname mysql | |
| # install the server | |
| sudo apt update | |
| sudo apt install mysql-server | |
| # run the wizard | |
| sudo mysql_secure_installation |
| ps -aux | grep chromedriver | |
| ps -aux | grep spec | |
| sudo systemctl restart mysql.service | |
| sudo systemctl stop nginx && sudo /etc/init.d/apache2 restart | |
| sudo systemctl stop nginx && sudo /etc/init.d/apache2 stop && sudo systemctl restart mysql.service | |
| sudo systemctl restart docker | |
| ps aux | grep chrome | grep headless | awk '{print $2}' | xargs kill |
| # CLI | |
| sudo apt update -y | |
| sudo apt install -y \ | |
| git curl docker.io \ | |
| build-essential pkg-config autoconf bison rustc cargo clang \ | |
| libssl-dev libreadline-dev zlib1g-dev libyaml-dev libreadline-dev libncurses5-dev libffi-dev libgdbm-dev libjemalloc2 \ | |
| libvips imagemagick libmagickwand-dev \ | |
| redis-tools sqlite3 libsqlite3-0 libmysqlclient-dev \ | |
| rbenv apache2-utils |
| " install ctags and run this in your root app folder to enable ctags -R --exclude=.git --exclude=log * | |
| set nocompatible | |
| set tabstop=2 softtabstop=2 | |
| set shiftwidth=2 | |
| set expandtab | |
| set smartindent | |
| set exrc | |
| set guicursor= | |
| set nu |
I liked the way Grokking the coding interview organized problems into learnable patterns. However, the course is expensive and the majority of the time the problems are copy-pasted from leetcode. As the explanations on leetcode are usually just as good, the course really boils down to being a glorified curated list of leetcode problems.
So below I made a list of leetcode problems that are as close to grokking problems as possible.
| ##based on Mesosphere Marathon's servicerouter.py haproxy config | |
| global | |
| daemon | |
| log 127.0.0.1 local0 | |
| log 127.0.0.1 local1 notice | |
| maxconn 4096 | |
| tune.ssl.default-dh-param 2048 | |
| defaults |
| global | |
| log /dev/log local0 | |
| log /dev/log local1 notice | |
| chroot /var/lib/haproxy | |
| stats socket /run/haproxy/admin.sock mode 660 level admin expose-fd listeners | |
| stats timeout 30s | |
| user haproxy | |
| group haproxy | |
| daemon |