Skip to content

Instantly share code, notes, and snippets.

@zaphar
Created December 24, 2008 20:55
Show Gist options
  • Save zaphar/39778 to your computer and use it in GitHub Desktop.
Save zaphar/39778 to your computer and use it in GitHub Desktop.
sync_git_branches () {
for BRANCH in $(git remote); do
git pull $BRANCH master;
done
}
sync_git_repos () {
CURR=$(pwd);
for DIR in $(ls); do
cd $DIR; sync_git_branches;
cd $CURR;
done
}
tag_java() {
for FILE in $(find -iname '*.java'); do
ctags --update --members --typedefs --typedefs-and-c++ --lang=java $FILE;
done;
}
clean_vim_files() {
for F in $(find ./ -iname '*.swp'); do
echo "Deleting: ${F}";
rm -f $F;
done
}
big_files() {
SCRIPT="{if (\$7 > ${1}) print \$0;}"
find . -ls 2>/dev/null | awk "${SCRIPT}" | sort -n
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment