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
| ### Testing if the client is a mobile or a desktop. | |
| ### The selection is based on the usual UA strings for desktop browsers. | |
| ## Testing a user agent using a method that reverts the logic of the | |
| ## UA detection. Inspired by notnotmobile.appspot.com. | |
| map $http_user_agent $is_desktop { | |
| default 0; | |
| ~*linux.*android|windows\s+(?:ce|phone) 0; # exceptions to the rule | |
| ~*spider|crawl|slurp|bot 1; # bots | |
| ~*windows|linux|os\s+x\s*[\d\._]+|solaris|bsd 1; # OSes |
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
| require 'apache_log/parser' | |
| module Embulk | |
| module Parser | |
| class Apache_log_rubyParserPlugin < ParserPlugin | |
| Plugin.register_parser("apache_log_ruby", self) | |
| STRING_FIELDS = %w[ remote_host identity_check user status size ].map{|x| x.to_sym } | |
| REQUEST_FIELDS = %w[ method path protocol ].map{ |x| x.to_sym } |
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
| Rails CMS alternatives | |
| ====================== | |
| Note: project activity was checked on 11/26/09 for most of these projects, and the "last update" field has not been kept up to date since then. | |
| Active projects: | |
| --------------- | |
| ComfortableMexicanSofa | |
| repo: https://github.com/comfy/comfortable-mexican-sofa | |
| Last update: 10/08/13 | |
| "ComfortableMexicanSofa is a powerful CMS Engine for Ruby on Rails applications" |