-
Notifications
You must be signed in to change notification settings - Fork 0
/
.alexrc.sh
55 lines (43 loc) · 831 Bytes
/
.alexrc.sh
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
echo "Loading alexrc."
alias gs="git status"
export PATH="./node_modules/.bin:$PATH"
function gmp {
git checkout master
git pull
}
function rcm {
code ~/alexrc.sh
}
function reloadrc {
source ~/alexrc.sh
}
# Opens the current repository's url on Github
function github {
git remote -v |\
grep origin |\
grep push |\
awk '{print $2}' |\
sed 's/git@github.com://' |\
sed 's/.git$//' |\
xargs -I {} open "https://github.com/{}"
}
function fif {
if [ -z "$1" ]; then
echo not adding anything
else
git add $@
fi
git commit --amend --no-edit
}
function gitilize {
git init
cat > .gitignore << EOF
.DS_Store
node_modules
EOF
git add .
git commit -m "Initial commit"
}
function clear_port {
lsof -i :$1 | grep node | awk '{ print $2 }' | tail -1 | xargs kill -9
}