MySQL convert datetime to Unix timestamp - Stack Overflow
UNIX_TIMESTAMP(STR_TO_DATE('Apr 15 2012 12:00AM', '%M %d %Y %h:%i%p'))
mysql  howto  datetime 
8 days ago
Object methods for rails (presence)
Returns the receiver if it's present otherwise returns nil. object.presence is equivalent to

object.present? ? object : nil
For example, something like

state = params[:state] if params[:state].present?
country = params[:country] if params[:country].present?
region = state || country || 'US'

region = params[:state].presence || params[:country].presence || 'US'
rails  documentation 
12 days ago
Active Support Core Extensions — Ruby on Rails Guides
The presence method returns its receiver if present?, and nil otherwise. It is useful for idioms like this:

host = config[:host].presence || 'localhost'
rails  documentation 
12 days ago
css  framework  ui  oocss 
14 days ago
This gem validates a URL, adds the http:// prefix if not included, and provides a get_domain method.
rails  gem  utility 
14 days ago
« earlier      
117lynn 337 ajax analytics android apache api app apple art article audio authentication awesome baby backup basecamp bash bathroom blacklight blog book bootstrap bowtie browser-compatability browsertesting calendaring case chart cheatsheet chrome cloud cms cocoa code4lib coffee collaborate color-management colorpalette comic construction css css3 culit-infrastructure d3.js dad data debugging deconstructed design dev devsetup documentation door drupal drupal7 drush ecommerce electrical email extension facebook finder firefox flooring fonts food forms framework free fun funny gallery game gem git github gitlab gitolite google grids hardware homebrew hosting howto html html5 icons ie ie6 ikea industrial-design inspiration interiordesign interview ios ipad iphone itunes java jersey jquery js json keyboard keyboardshortcuts kitchen lax leopard library linked-data linux lion mac mannweb mantra mapping markdown mbookpro media-queries mlion mobile mobile-first module music mysql networking nodejs notational-velocity notes notetaking nyc omnigraffle opac opensource optimization osx pdf performance photography photoshop php plugin postbox presentation privacy productivity programming projectmanagement prototyping python rails rant rdf recipes reference regex responsive-design retina-display review rmbp rss ruby safari sass screencast search security semantic shed simplenote singlefunction sketching snowleopard social solr sotrue sparql ssh startup stats stencils stylus sublimetext svn taxonomy teeal templates templatingengine terminal testing textmate theme themes theming timemachine tivo todo tomcat tools touch trends tricks tutorial twitter typography ubuntu ui unix usability utility ux video views visualization vivonih vortex wallpapers weather webapp webdesign webdev webfonts webform windows wireframing wordpress writing

Copy this bookmark: