bash resources

set_cache, a workaround to bundlers. Use CLEAR_FILE to prevent accidental sed overwrites. Replace all query string numbers with $1 arg to set_cache.

set_cache(){
     
     CLEAR_FILE=./.safe_set_cache
     if test -f "$CLEAR_FILE"; then
         find  . -type f -exec sed -i 's/cache_bust = [0-9]/cache_bust = '$1'/g' {} \;         
         find  . -type f -exec sed -i 's/\?v=[0-9]/?v='$1'/g' {} \;
     else
         echo "invalid set_cache dir - .safe_set_cache required"
     fi
 }

If you use the same file structure or framework frequently and often code with multiple windows - start all the directories or files at once with Sublime Text (subl).

substart(){

    CLEAR_FILE=./.sublime_root
    if test -f "$CLEAR_FILE"; then
        subl client/
        subl server/
        sleep 1
        subl index.js
    else
        echo "sublime root not found - .sublime_root"
    fi
}

A rough file / directory search:

blorb(){

        find . -maxdepth 5 -name "*$1*"
}

git push shorthand, when using git solely as a backup or mirror and pushing rapidly:

licketygit () {

        git add .
        git commit -a -m $1
        git push origin
}
oko
friend