summaryrefslogtreecommitdiffstats
path: root/root/.bash_aliases
blob: abff120a94a38d5844b5d053860249c4d1f868f7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
export CT_ALLOW_BUILD_AS_ROOT_SURE=1
function register () {
	n=`curl https://www.register.si | grep nonce | head -n 1 | cut -d\" -f8`
	curl https://www.register.si/wp-admin/admin-ajax.php -X POST --data-raw "_ajax_nonce=$n&action=get_whois_data&domain=`sed s/.si\$//g <<<$1`.si" 2> /dev/null | grep "<td>" | sed "s/^\s*//g" | cut -d\< -f2 | cut -d\> -f2 | grep "[[:print:]]"
}
alias r=R
alias R="R --quiet"
alias jupyter-server="jupyter-server --allow-root"
alias jupyter-notebook="jupyter-notebook --allow-root"
function kladivo () {
	iptables -A INPUT -s $1 -j DROP
}
function c () {
	gcc -g -Wall -Wextra -pedantic -Wformat -Wformat-security $@ -lm
}
alias pmbootstrap="pmbootstrap --as-root"
function upload () {
	chmod 0664 "$1"
	sftp -b- upload@4a.si <<< "put '$1' www/`[ '$2'x = x ] && echo $1 || echo $2`"
}
HISTCONTORL=ignoreboth
shopt -s histappend
HISTSIZE=100000000
HISTFILESIZE=1000000000
function upload () {
	# chmod 0644 "$1"
	d=`[ '$2'x = x ] && echo $1 || echo $2`
	sftp -b- upload@upload.sijanec.eu <<< "put '$1' www/$d"
	ssh upload@upload.sijanec.eu chmod 0644 "www/$d"
	echo https://upload.sijanec.eu./$d | xclip
}
function mcd () {
	mkdir -p $@ && cd $@
}
function ocd () {
	cd $OLDPWD
}
alias gdb="gdb -q"
alias x11vnc="x11vnc -repeat -multiptr"
alias digs="dig +nocomments +noquestion +nostats +norrcomments +nocmd"
alias nc="nc -v"
alias m=make
export EDITOR=/usr/bin/vim
ulimit -c unlimited # core dumps
alias pi="python3 -m pip install --user --break-system-packages"
alias pu="python3 -m pip uninstall --break-system-packages"
if [ `id -u` -eq 0 ]
then
	alias binwalk="binwalk --run-as=root"
fi
PATH=$PATH:~/.local/bin