-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.functions
43 lines (34 loc) · 821 Bytes
/
.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
#! /bin/bash
QUIET='&> /dev/null'
OS=$( uname -r | sed 's/^.*\(el[0-9]\+\).*$/\1/' )
pandoc2pdf()
{
if [[ "$OS" == "el8" ]]; then
pandoc -V geometry:letterpaper -V geometry:margin=1in $1 --pdf-engine=pdflatex -o $2
else
pandoc -V geometry:letterpaper -V geometry:margin=1in $1 --latex-engine=pdflatex -o $2
fi
}
passgen()
{
cat /dev/urandom | tr -dc 'a-zA-Z0-9!@#$%&' | fold -w 16 | head -n100 | shuf -n1
}
proxify()
{
PROXY='http://localhost:8080'
export http_proxy="$PROXY"
export HTTP_PROXY="$PROXY"
export https_proxy="$PROXY"
export HTTPS_PROXY="$PROXY"
}
pithos-start()
{
# activate Python3
. /opt/python3.7/venv/bin/activate
# launch Pithos
eval pushd /opt/pithos "$QUIET"
eval ninja -C build run "$QUIET" &
eval popd "$QUIET"
# deactivate Python3
deactivate
}