-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.functions
66 lines (52 loc) · 1.04 KB
/
.functions
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#!/bin/bash
ip-resolve() {
curl -s http://ip-api.com/json/$1 | jq
}
myip() {
curl -s https://api.myip.com/ | jq
}
open-port() {
# first argument is IP and second is port
nc -vz $1 $2
}
open-ports() {
sudo nmap -sS $1
}
open-ports-deep() {
nmap -p- -vv -T5 -A $1
}
echo-all() {
echo $@
}
lst(){
find $1 -type f -print0 | xargs -0 ls -lth --time-style="+%F %T" | less
}
whois(){
# whois api from api-ninjas.com
curl -s --header "X-Api-Key: syDLzMVkdEop2RhBQuhXgA==14if9r4RPC1oDlpj" https://api.api-ninjas.com/v1/whois\?domain\=$1 | jq
}
#composer functions
composerv(){
# argument is php version name
if [ -z "$1" ]
then
echo "PHP version is not given"
kill -INT $$
fi
`which $1` `which composer` install
}
composer7.4() {
`which php7.4` `which composer` $@
}
composer8.0() {
`which php8.0` `which composer` $@
}
composer8.1() {
`which php8.1` `which composer` $@
}
composer8.2() {
`which php8.2` `which composer` $@
}
composer8.3() {
`which php8.3` `which composer` $@
}