You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
dotfiles/.aliases.d/programming.sh

68 lines
1.8 KiB

#programming
alias view-hex='xxd'
alias cdiff='colordiff'
alias cmm='./configure && make && sudo make install'
alias code='codium'
alias c11='g++ -std=c++11'
export BOOST='/opt/boost_1_55_0'
alias c14='g++-4.9 -std=c++14 -pedantic -Wall -I $BOOST'
alias boost='c++ -I $BOOST'
alias gor='go run -v -x'
alias gob='go build -v -x'
qt2py() {
if [ -f "$1.ui" ]; then
pyuic5 -x "$1.ui" -o "$1.py"
else
echo "Enter a qt.ui file to convert into python"
fi
}
so-find() {
ldconfig -p | grep "$1"
}
# Validate my shell scripts
# apt install shellcheck ??
# https://www.shellcheck.net
# https://github.com/koalaman/shellcheck/releases
alias bashc='shellcheck'
# Free Basic Compiler
alias qb='fbc -lang qb '
#phpstan
phx() {
local target="$1"
local input_level="$2"
local level=7
local stanexec="./vendor/bin/phpstan"
if [[ -x "$stanexec" ]]; then
local stan="$stanexec"
else
local stan="phpx"
fi
# Check if input_level is a number between 0 and 10
if [[ "$input_level" =~ ^[0-9]+$ ]] && (( input_level >= 0 && input_level <= 10 )); then
level="$input_level"
fi
if [[ -z "$target" ]]; then
"$stan"
else
"$stan" analyse --level="$level" "$target"
fi
}
#sudo apt-get install aspell aspell-en
#composer require peckphp/peck --dev
#./vendor/bin/peck --init
alias phck='./vendor/bin/peck'
#composer require rector/rector --dev
alias phrector-dry='./vendor/bin/rector src --dry-run'
alias phre='./vendor/bin/rector'
#composer remove phpunit/phpunit
#composer require pestphp/pest --dev --with-all-dependencies
#./vendor/bin/pest --init
alias pe-cc='./vendor/bin/pest --parallel --coverage'
alias pe-tc='./vendor/bin/pest --type-coverage --min=100'
alias pe-arch='./vendor/bin/pest --arch'
alias pe-pa='./vendor/bin/pest --parallel'