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 characters
| var Resize = function(outputQuality) { | |
| this.outputQuality = (outputQuality === 'undefined' ? 0.8 : outputQuality); | |
| this.photo = function(file, maxWidth, maxHeight, outputType, callback) { | |
| var _this = this; | |
| var reader = new FileReader(); | |
| reader.onloadend = function(readerEvent) { | |
| _this.resize(readerEvent.target.result, maxWidth, maxHeight, outputType, callback); | |
| } | |
| reader.readAsDataURL(file); | |
| } |
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 characters
| function parseVideo (url) { | |
| // - Supported YouTube URL formats: | |
| // - http://www.youtube.com/watch?v=My2FRPA3Gf8 | |
| // - http://youtu.be/My2FRPA3Gf8 | |
| // - https://youtube.googleapis.com/v/My2FRPA3Gf8 | |
| // - Supported Vimeo URL formats: | |
| // - http://vimeo.com/25451551 | |
| // - http://player.vimeo.com/video/25451551 | |
| // - Also supports relative URLs: | |
| // - //player.vimeo.com/video/25451551 |
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 characters
| # 1. Install mplayer command line (via Brew, Macports, or APT) | |
| # 2. Add the following aliases to ~/.profile | |
| # 3. Type `source ~/.profile` | |
| # 3. Type `news` or `current` to listen in your terminal | |
| alias news="mplayer -playlist http://minnesota.publicradio.org/tools/play/streams/news.pls" # MPR News | |
| alias current="mplayer -playlist http://minnesota.publicradio.org/tools/play/streams/the_current.pls" # The Current | |
| alias classical="mplayer -playlist http://minnesota.publicradio.org/tools/play/streams/classical.pls" # Classical MPR | |
| alias localcurrent="mplayer -playlist http://minnesota.publicradio.org/tools/play/streams/local.pls" # Local Current | |
| alias heartland="mplayer -playlist http://minnesota.publicradio.org/tools/play/streams/radio_heartland.pls" # MPR Radio Heartland |
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 characters
| # Rebuild curl with sftp support | |
| apt-get install -y build-essential debhelper libssh2-1-dev | |
| apt-get source curl | |
| apt-get build-dep -y curl | |
| cd curl-* | |
| DEB_BUILD_OPTIONS=nocheck dpkg-buildpackage | |
| cd .. | |
| dpkg -i curl*.deb libcurl3-nss*.deb libcurl4-doc*.deb libcurl4-openssl*.deb libcurl3_*.deb | |
| # Use "drench" version which support `git ftp fetch` |