This file contains 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
return { | |
Country: self.fetch_country(city), | |
Region: self.fetch_region(city), | |
City: self.fetch_city(city), | |
None: None | |
}[type(location)] |
This file contains 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
getFormattedDate = -> | |
date = new Date() | |
date.getMonth() + "/" + date.getDate() + "/" + date.getFullYear() + " " + date.getHours() + ":" + date.getMinutes() | |
resetPullHeader = -> | |
actInd.hide() | |
imageArrow.transform = Ti.UI.create2DMatrix() | |
if refreshCount < 2 | |
imageArrow.show() | |
labelStatus.text = "Pull down to refresh..." | |
labelLastUpdated.text = "Last Updated: " + getFormattedDate() |
This file contains 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
# By Oto Brglez - @otobrglez | |
# Rake task. Put in your (lib/tasks) folder of your Rails application | |
# Execute with "rake dropbox:backup" | |
# Configuration must be inside config/dropbox.yml file | |
namespace :dropbox do | |
desc "Backup production database to dropbox" | |
task :backup do | |
This file contains 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
# config/initializers/active_admin.rb | |
ActiveAdmin.setup do |config| | |
# All the ActiveAdmin config stuf | |
end | |
Dir[ File.join(Rails.root, "lib", "active_admin_extentions", "*.rb") ].each {|l| require l } |
NewerOlder