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
| <?php | |
| function flattenExceptionBacktrace(\Exception $exception) { | |
| $traceProperty = (new \ReflectionClass('Exception'))->getProperty('trace'); | |
| $traceProperty->setAccessible(true); | |
| $flatten = function(&$value, $key) { | |
| if ($value instanceof \Closure) { | |
| $closureReflection = new \ReflectionFunction($value); | |
| $value = sprintf( | |
| '(Closure at %s:%s)', |
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
| #!/bin/bash | |
| DYNAMODB_USER=vagrant | |
| sudo apt-get install openjdk-7-jre-headless -y | |
| cd /home/${DYNAMODB_USER}/ | |
| mkdir -p dynamodb | |
| cd dynamodb |
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
| <!-- Mobile meta & links --> | |
| <!-- Reference | |
| Custom Icon and Image Creation Guidelines: | |
| http://developer.apple.com/library/safari/#documentation/UserExperience/Conceptual/MobileHIG/IconsImages/IconsImages.html | |
| Configuring Web Applications: | |
| http://developer.apple.com/library/safari/#documentation/appleapplications/reference/safariwebcontent/configuringwebapplications/configuringwebapplications.html |
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
| #!/bin/bash | |
| # These are the original commands, courtesy of: | |
| # http://www.ravelrumba.com/blog/watch-compile-less-command-line/ | |
| # Requires watchr: https://github.com/mynyml/watchr | |
| # watchr -e 'watch(".*\.less$") { |f| system("lessc #{f[0]} > #{f[0]}.css && echo \"#{f[0]} > #{f[0]}.css\" "}') } | |
| # Requires inotify-tools: https://github.com/rvoicilas/inotify-tools | |
| # while true;do N=`find -name "*.less" `;inotifywait -qe modify $N ;for f in $N;do lessc $f ${f%.*}.css;done;done |
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
| #!/bin/bash | |
| # These are the original commands, courtesy of: | |
| # http://www.ravelrumba.com/blog/watch-compile-less-command-line/ | |
| # Requires watchr: https://github.com/mynyml/watchr | |
| # watchr -e 'watch(".*\.less$") { |f| system("lessc #{f[0]} > #{f[0]}.css && echo \"#{f[0]} > #{f[0]}.css\" "}') } | |
| # Requires inotify-tools: https://github.com/rvoicilas/inotify-tools | |
| # while true;do N=`find -name "*.less" `;inotifywait -qe modify $N ;for f in $N;do lessc $f ${f%.*}.css;done;done |
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 DateHelper = { | |
| // Takes the format of "Jan 15, 2007 15:45:00 GMT" and converts it to a relative time | |
| // Ruby strftime: %b %d, %Y %H:%M:%S GMT | |
| time_ago_in_words_with_parsing: function(from) { | |
| var date = new Date; | |
| date.setTime(Date.parse(from)); | |
| return this.time_ago_in_words(date); | |
| }, | |
| time_ago_in_words: function(from) { |