-
-
Save yugoslavskiy/8c51a6af08b58f42dccc to your computer and use it in GitHub Desktop.
Revisions
-
yugoslavskiy revised this gist
Apr 26, 2016 . 1 changed file with 3 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -23,5 +23,8 @@ rm -fv "${ST3_PATH}"/Local/*.sublime_session echo "[*] remove workspaces..." sudo find / -type f -name '*.sublime-workspace' -exec rm -fv {} + 2>/dev/null echo "" echo "[*] sublime-clean: Done." echo "" exit 0 -
yugoslavskiy revised this gist
Mar 21, 2016 . No changes.There are no files selected for viewing
-
yugoslavskiy renamed this gist
Mar 20, 2016 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
yugoslavskiy revised this gist
Mar 20, 2016 . No changes.There are no files selected for viewing
-
yugoslavskiy revised this gist
Mar 20, 2016 . 1 changed file with 0 additions and 5 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -7,26 +7,21 @@ set -e unset CDPATH unset IFS [ $( uname -s ) = "Darwin" ] && ST3_PATH=~/Library/Application\ Support/Sublime\ Text\ 3 [ $( uname -s ) = "Linux" ] && ST3_PATH=~/.config/sublime-text-3 echo "[*] remove cache..." rm -rfv "${ST3_PATH}"/Packages/.logs/ rm -rfv "${ST3_PATH}"/Backup/ rm -rfv "${ST3_PATH}"/Cache/ rm -rfv "${ST3_PATH}"/Index/ rm -rfv "${ST3_PATH}"/Settings/ echo "[*] remove sesions..." rm -fv "${ST3_PATH}"/Local/*.sublime_session echo "[*] remove workspaces..." sudo find / -type f -name '*.sublime-workspace' -exec rm -fv {} + 2>/dev/null echo "[*] sublime-clean: Done." exit 0 -
yugoslavskiy revised this gist
Mar 20, 2016 . 1 changed file with 6 additions and 6 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -13,15 +13,15 @@ unset IFS echo "[*] remove cache..." rm -rfv "${ST3_PATH}"/Packages/.logs/ rm -rfv "${ST3_PATH}"/Backup/ rm -rfv "${ST3_PATH}"/Cache/ rm -rfv "${ST3_PATH}"/Index/ rm -rfv "${ST3_PATH}"/Settings/ echo "[*] remove sesions..." rm -fv "${ST3_PATH}"/Local/*.sublime_session echo "[*] remove workspaces..." -
yugoslavskiy revised this gist
Mar 20, 2016 . 1 changed file with 17 additions and 81 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,96 +1,32 @@ #!/bin/sh # original file: # https://gist.github.com/gerardroche/6e46cbdf8da19a39f9da set -e unset CDPATH unset IFS [ $( uname -s ) = "Darwin" ] && ST3_PATH=~/Library/Application\ Support/Sublime\ Text\ 3 [ $( uname -s ) = "Linux" ] && ST3_PATH=~/.config/sublime-text-3 echo "[*] remove cache..." rm -rfv ${ST3_PATH}/Packages/.logs/ rm -rfv ${ST3_PATH}/Backup/ rm -rfv ${ST3_PATH}/Cache/ rm -rfv ${ST3_PATH}/Index/ rm -rfv ${ST3_PATH}/Settings/ echo "[*] remove sesions..." rm -fv ${ST3_PATH}/Local/*.sublime_session echo "[*] remove workspaces..." sudo find / -type f -name '*.sublime-workspace' -exec rm -fv {} + 2>/dev/null echo "[*] sublime-clean: Done." exit 0 -
gerardroche revised this gist
Feb 3, 2016 . 1 changed file with 27 additions and 5 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -34,30 +34,52 @@ while test "$#" != 0; do shift done echo "=> ST2..." # ST2 Linux rm -rfv ~/.config/sublime-text-2/Installed\ Packages/ rm -rfv ~/.config/sublime-text-2/Packages/ rm -rfv ~/.config/sublime-text-2/Pristine\ Packages/ # ST2 OSX rm -rfv ~/Library/Application\ Support/Sublime\ Text\ 2/Installed\ Packages/ rm -rfv ~/Library/Application\ Support/Sublime\ Text\ 2/Packages/ rm -rfv ~/Library/Application\ Support/Sublime\ Text\ 2/Pristine\ Packages/ if [ "$REMOVE_SESSIONS" = "y" ]; then # ST2 Linux sessions rm -fv ~/.config/sublime-text-2/Settings/*.sublime_session # ST2 OSX sessions rm -fv ~/Library/Application\ Support/Sublime\ Text\ 2/Settings/*.sublime_session fi echo "=> ST3..." # ST3 Linux rm -rfv ~/.config/sublime-text-3/Packages/.logs/ rm -rfv ~/.config/sublime-text-3/Backup/ rm -rfv ~/.config/sublime-text-3/Cache/ rm -rfv ~/.config/sublime-text-3/Index/ rm -rfv ~/.config/sublime-text-3/Settings/ # ST3 OSX rm -rfv ~/Library/Application\ Support/Sublime\ Text\ 3/Packages/.logs/ rm -rfv ~/Library/Application\ Support/Sublime\ Text\ 3/Backup/ rm -rfv ~/Library/Application\ Support/Sublime\ Text\ 3/Cache/ rm -rfv ~/Library/Application\ Support/Sublime\ Text\ 3/Index/ rm -rfv ~/Library/Application\ Support/Sublime\ Text\ 3/Settings/ if [ "$REMOVE_SESSIONS" = "y" ]; then # ST3 Linux sessions rm -fv ~/.config/sublime-text-3/Local/*.sublime_session # ST3 OSX sessions rm -fv ~/Library/Application\ Support/Sublime\ Text\ 3/Local/*.sublime_session fi if [ "$REMOVE_WORKSPACES" = "y" ]; then @@ -71,4 +93,4 @@ if [ "$REMOVE_WORKSPACES" = "y" ]; then fi fi echo "=> done" -
gerardroche revised this gist
Feb 3, 2016 . 1 changed file with 4 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -50,8 +50,11 @@ fi echo "=> ST3..." rm -rfv ~/.config/sublime-text-3/Packages/.logs/ rm -rfv ~/.config/sublime-text-3/Backup/ rm -rfv ~/.config/sublime-text-3/Cache/ rm -rfv ~/.config/sublime-text-3/Index/ rm -rfv ~/.config/sublime-text-3/Settings/ if [ "$REMOVE_SESSIONS" = "y" ]; then rm -fv ~/.config/sublime-text-3/Local/*.sublime_session @@ -68,4 +71,4 @@ if [ "$REMOVE_WORKSPACES" = "y" ]; then fi fi echo "=> done" -
gerardroche revised this gist
Jan 9, 2016 . 1 changed file with 38 additions and 24 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -4,47 +4,61 @@ set -e unset CDPATH unset IFS show_usage() { echo "usage: [PROJECTS_PATH=<path>] $(basename $0) [--sessions] [--workspaces] By default sessions and workspaces are not removed. The PROJECTS_PATH environment variable can be used to specify a location to find sublime workspaces. ## Example The following will remove all sublime workspaces, \"*.sublime-workspace\", within the ~/code directory. $ PROJECTS_PATH=~/code sublime-clean --workspaces " } while test "$#" != 0; do case "$1" in --help|-h) show_usage; exit 0 ;; --sessions) REMOVE_SESSIONS=y ;; --workspaces) REMOVE_WORKSPACES=y ;; --) shift; break ;; # standard terminate loop; end of options list -*) echo >&2 "$0: unknown option '$1'"; exit 1 ;; *) echo >&2 "$0: unknown argument '$1'"; exit 1 ;; esac shift done # ST2 echo "=> ST2..." rm -rfv ~/.config/sublime-text-2/Installed\ Packages/ rm -rfv ~/.config/sublime-text-2/Packages/ rm -rfv ~/.config/sublime-text-2/Pristine\ Packages/ if [ "$REMOVE_SESSIONS" = "y" ]; then rm -fv ~/.config/sublime-text-2/Settings/*.sublime_session fi # ST3 echo "=> ST3..." rm -rfv ~/.config/sublime-text-3/Cache/ rm -rfv ~/.config/sublime-text-3/Index/ if [ "$REMOVE_SESSIONS" = "y" ]; then rm -fv ~/.config/sublime-text-3/Local/*.sublime_session fi if [ "$REMOVE_WORKSPACES" = "y" ]; then echo "=> remove workspaces..." rm -fv *.sublime-workspace if [ -d "$PROJECTS_PATH" ]; then rm -fv "$PROJECTS_PATH"/*.sublime-workspace -
gerardroche revised this gist
Nov 14, 2015 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -12,7 +12,7 @@ if [ "$1" = "-h" -o "$1" = "--help" ]; then $ sublime-clean --sessions Including the --workspaces option and specifying a \"PROJECTS_PATH\" environment variable will remove any \"*.sublime-workspace\" files in the given projects path. The following will clear out sublime workspaces three levels deep within the ~/code directory. -
gerardroche revised this gist
Nov 14, 2015 . 1 changed file with 17 additions and 10 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,19 +1,26 @@ #!/bin/sh set -e unset CDPATH unset IFS if [ "$1" = "-h" -o "$1" = "--help" ]; then echo "usage: [PROJECTS_PATH=<path>] $(basename $0) [--sessions] [--workspaces] Including the --sessions option will remove any sublime sessions. $ sublime-clean --sessions Including the --workspaces option and specifying a \"PROJECTS_PATH\" environment variable will remove any \"*.sublime-workspace\" files with the given projects path. The following will clear out sublime workspaces three levels deep within the ~/code directory. $ PROJECTS_PATH=~/code sublime-clean --workspaces " exit 0 fi # Clean ST2 # Always fully clean ST2 # I only use it for testing plugin compatability -
gerardroche revised this gist
Nov 14, 2015 . 1 changed file with 5 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,11 +1,14 @@ #!/bin/sh # # To remove "*.sublime-workspace" files specify a location via a # `PROJECTS_PATH` environment variable and add the `--workspaces` option. # # ```sh # $ PROJECTS_PATH=~/code sublime-clean --workspaces # ``` # # The above will clear out workspaces three levels deep within the `~/code` # directory. set -e unset CDPATH -
gerardroche revised this gist
Nov 14, 2015 . 1 changed file with 7 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,11 @@ #!/bin/sh # # To clear out "*,sublime-workspace" files specify a location via a `PROJECTS_PATH` environment variable. # # ```sh # $ PROJECTS_PATH=~/code sublime-clean --workspaces # ``` # The above will clear out workspaces three levels deep within the `PROJECT_PATH` location. set -e unset CDPATH -
gerardroche revised this gist
Nov 14, 2015 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -16,8 +16,8 @@ rm -fv ~/.config/sublime-text-2/Settings/*.sublime_session # Clean ST3 echo "=> clean ST3..." rm -rfv ~/.config/sublime-text-3/Cache/ rm -rfv ~/.config/sublime-text-3/Index/ if [ "$1" = "--sessions" ]; then echo "=> removing sessions..." -
gerardroche revised this gist
Nov 11, 2015 . 1 changed file with 25 additions and 7 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,22 +1,40 @@ #!/bin/sh set -e unset CDPATH unset IFS # Clean ST2 # Always fully clean ST2 # I only use it for testing plugin compatability echo "=> clean ST2..." rm -rfv ~/.config/sublime-text-2/Installed\ Packages/ rm -rfv ~/.config/sublime-text-2/Packages/ rm -rfv ~/.config/sublime-text-2/Pristine\ Packages/ rm -fv ~/.config/sublime-text-2/Settings/*.sublime_session # Clean ST3 echo "=> clean ST3..." # rm -rfv ~/.config/sublime-text-3/Cache/ # rm -rfv ~/.config/sublime-text-3/Index/ if [ "$1" = "--sessions" ]; then echo "=> removing sessions..." shift rm -fv ~/.config/sublime-text-3/Local/*.sublime_session fi if [ "$1" = "--workspaces" ]; then echo "=> removing workspaces" shift rm -fv *.sublime-workspace if [ -d "$PROJECTS_PATH" ]; then rm -fv "$PROJECTS_PATH"/*.sublime-workspace rm -fv "$PROJECTS_PATH"/*/*.sublime-workspace rm -fv "$PROJECTS_PATH"/*/*/*.sublime-workspace rm -fv "$PROJECTS_PATH"/.sublime/*.sublime-workspace fi fi echo "=> done" -
gerardroche revised this gist
Jun 14, 2015 . 1 changed file with 10 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,13 +1,22 @@ #!/bin/sh # # Sublime Text cache, index, session, etc. cleaner set -e unset CDPATH unset IFS # Always fully clean ST2, because I only use it for testing plugin compatability. rm -rfv ~/.config/sublime-text-2/Installed\ Packages/ rm -rfv ~/.config/sublime-text-2/Packages/ rm -rfv ~/.config/sublime-text-2/Pristine\ Packages/ rm -fv ~/.config/sublime-text-2/Settings/*.sublime_session # ST3 rm -rfv ~/.config/sublime-text-3/Cache/ rm -rfv ~/.config/sublime-text-3/Index/ if [ "$1" = "--include-sessions" ]; then rm -fv ~/.config/sublime-text-3/Local/*.sublime_session fi -
gerardroche created this gist
Jan 19, 2015 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,13 @@ #!/bin/sh set -e unset CDPATH unset IFS rm -rfv ~/.config/sublime-text-3/Cache/ rm -rfv ~/.config/sublime-text-3/Index/ if [ "$1" = "--include-sessions" ]; then rm -fv ~/.config/sublime-text-3/Local/*.sublime_session rm -fv ~/.config/sublime-text-2/Settings/*.sublime_session fi