Skip to content

Purpose of this document:

Our CSS is a mess and needs to improve. Let's have some rules for that.

Style classes not elements

Our habit to style elements makes it easy to swap elements without affecting style.

Generalise styles

View dictkeys
return {
Country: self.fetch_country(city),
Region: self.fetch_region(city),
City: self.fetch_city(city),
None: None
View gist:f84c5ccb5725feb9c35c
getFormattedDate = ->
date = new Date()
date.getMonth() + "/" + date.getDate() + "/" + date.getFullYear() + " " + date.getHours() + ":" + date.getMinutes()
resetPullHeader = ->
imageArrow.transform = Ti.UI.create2DMatrix()
if refreshCount < 2
labelStatus.text = "Pull down to refresh..."
labelLastUpdated.text = "Last Updated: " + getFormattedDate()
View dropbox.rake
# 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
# config/initializers/active_admin.rb
ActiveAdmin.setup do |config|
# All the ActiveAdmin config stuf
Dir[ File.join(Rails.root, "lib", "active_admin_extentions", "*.rb") ].each {|l| require l }
Something went wrong with that request. Please try again.