Created
April 7, 2015 23:44
-
-
Save makevoid/9ffb3a4aefb5d81c5e1f to your computer and use it in GitHub Desktop.
Get all the apps you are developing on sorted by time
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
| # Readme.md | |
| # | |
| # # apps_get | |
| # | |
| # ### Get all the apps you are developing on atm, sorted by time | |
| # | |
| # ### Set your configs (APP_PATH) and then: | |
| # | |
| # ruby appsGet.rb | |
| # | |
| # and you will get a list of your apps | |
| # | |
| # config.rb | |
| # | |
| APPS_PATH = "~/apps" | |
| # utils.rb | |
| # | |
| appsGet = -> do | |
| Dir.glob(File.expand_path "#{APPS_PATH}/*") | |
| .sort_by { |app| File.mtime app } | |
| .map do |app| | |
| File.basename app | |
| end | |
| end | |
| # main.rb | |
| # | |
| # require_relative 'utils' | |
| APPS = appsGet.() | |
| puts APPS |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment