Skip to content

Instantly share code, notes, and snippets.

@rev087
Created September 24, 2011 22:02
Show Gist options
  • Save rev087/1239925 to your computer and use it in GitHub Desktop.
Save rev087/1239925 to your computer and use it in GitHub Desktop.
ass - JavaScript assets download for lazy asses
#!/bin/sh
label() {
printf '\033[1;30;43m %s \033[0m\n' $1
}
# jQuery
label jquery-1.6.4.min.js
curl http://code.jquery.com/jquery-1.6.4.min.js > jquery-1.6.4.min.js
# Backbone.js
label backbone-0.5.3.min.js
curl http://documentcloud.github.com/backbone/backbone-min.js > backbone-0.5.3.min.js
# Underscore.js
label underscore-1.1.7.min.js
curl http://documentcloud.github.com/underscore/underscore-min.js > underscore-1.1.7.min.js
# json2.js
label json2.js
curl https://raw.github.com/douglascrockford/JSON-js/master/json2.js | uglifyjs > json2.min.js
# Raphaël
label raphael-1.5.2.min.js
curl https://raw.github.com/DmitryBaranovskiy/raphael/master/raphael-min.js > raphael-1.5.2.min.js
# gRaphaël
label graphael
curl https://raw.github.com/DmitryBaranovskiy/g.raphael/master/g.raphael-min.js > g.raphael-0.4.1.min.js
printf '\033[1;30;42m DONE \033[0m - ready to paste, lazyass!\n'
echo '<script src="/jquery-1.6.4.min.js"></script>
<script src="/backbone-0.5.3.min.js"></script>
<script src="/underscore-1.1.7.min.js"></script>
<script src="/json2.min.js"></script>
<script src="/raphael-1.5.2.min.js"></script>
<script src="/g.raphael-0.4.1.min.js"></script>' | pbcopy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment