View dictkeys
1 2 3 4 5 6
return {
Country: self.fetch_country(city),
Region: self.fetch_region(city),
City: self.fetch_city(city),
None: None
}[type(location)]
View gist:f84c5ccb5725feb9c35c
1 2 3 4 5 6 7 8 9 10
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()
View dropbox.rake
1 2 3 4 5 6 7 8 9 10
# 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
View active_admin.rb
1 2 3 4 5 6
# 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 }
Something went wrong with that request. Please try again.