blob: 6d1796db6c48273baede3ae42c998944a1b59aaf (
plain)
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
|
#!/bin/bash
export EDITOR="vim"
export PAGER="less -R"
alias ls='ls --color=auto'
alias grep='grep --color=auto'
alias diff='colordiff'
alias less='less -R'
alias vmount='udevil mount'
alias vumount='udevil umount'
alias def='sdcv'
send() {
if [ "$1" ]; then
scp $@ shmibbles.me:/srv/http/tmp/
if [ $? -eq 0 ]; then
for name in "$@"
do
name=$(echo "http://shmibbles.me/tmp/$(basename $name)" | sed 's/ /%20/g')
echo $name | tr -d '\n' | xclip -i -selection clipboard
echo $name | tr -d '\n' | xclip -i -selection primary
done
fi
else
echo "specify at least one file to send"
fi
}
sendi() {
if [ "$1" ]; then
scp $@ shmibbles.me:/srv/http/img/
if [ $? -eq 0 ]; then
for name in "$@"
do
name=$(echo "http://shmibbles.me/img/$(basename $name)" | sed 's/ /%20/g')
echo $name | tr -d '\n' | xclip -i -selection clipboard
echo $name | tr -d '\n' | xclip -i -selection primary
done
fi
else
echo "specify at least one file to send"
fi
}
|