Skip to content

Instantly share code, notes, and snippets.

View Salanoid's full-sized avatar
🌼

Salajan Silviu Salanoid

🌼
View GitHub Profile
@Salanoid
Salanoid / vimrc-moved.md
Last active July 16, 2025 13:55
My .vimrc WIP
@Salanoid
Salanoid / .ideavimrc
Created November 14, 2024 12:33
IdeaVim config
" vim settings
set scrolloff=5
set history=1000
set clipboard+=unnamedplus
" status bar
set showmode
" leader
map <space> <nop>
@Salanoid
Salanoid / Readme.md
Last active October 16, 2024 12:49
factureaza change total to price and vat_type to 1 (tva implicit), send to efactura

PHP script for change total to price and vat_type to 1 (total_to_price.php)

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.

PHP script for send invoices to efactura (send_to_efactura.php)

@Salanoid
Salanoid / shell.sh
Created May 9, 2024 06:12 — forked from alexwebgr/shell.sh
Install MySQL on ubuntu 20.04 and set the root password
# 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
@Salanoid
Salanoid / linux-setup.sh
Created April 12, 2024 09:17 — forked from dhh/linux-setup.sh
linux-setup.sh
# 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
@Salanoid
Salanoid / init.vim
Last active July 23, 2022 12:01
vimrc
" 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
@Salanoid
Salanoid / grokking_to_leetcode.md
Created April 21, 2022 07:10 — forked from tykurtz/grokking_to_leetcode.md
Grokking the coding interview equivalent leetcode problems

GROKKING NOTES

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.

Pattern: Sliding Window

@Salanoid
Salanoid / haproxy.cfg
Created February 24, 2022 12:22 — forked from bhameyie/haproxy.cfg
Sample haproxy config
##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
@Salanoid
Salanoid / haproxy.cfg
Created February 22, 2022 18:20
default haproxy.cfg
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