nginx expires config
location ~* ^.+\.(js|css|php|jpg|jpeg|gif|png|pdf|zip|rar)$ { root /var/www/apps/myapp/public; access_log off; expires 7d; }
12123 users tagging and storing useful source code snippets
Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world
John http://www.red91.com
location ~* ^.+\.(js|css|php|jpg|jpeg|gif|png|pdf|zip|rar)$ { root /var/www/apps/myapp/public; access_log off; expires 7d; }
# output compression saves bandwidth gzip on; gzip_proxied any; gzip_http_version 1.1; #gzip_min_length 1100; gzip_comp_level 5; #gzip_buffers 4 8k; gzip_types text/plain text/html text/xml text/css application/x-javascript text/xml application/xml application/xml+rss text/javascript application/atom+xml; #gzip_vary on; #gzip_disable "MSIE [1-6]\.";
config.action_mailer.raise_delivery_errors = true ActionMailer::Base.delivery_method = :sendmail ActionMailer::Base.sendmail_settings = { :location => '/usr/sbin/sendmail', :arguments => '-i -t' }
@users = User.find( :all, :select => "MONTH(created_at) as month, YEAR(created_at) as year, COUNT(*) AS records", :conditions => ["admin = 0'"], :group => "year, month") <% for @user in @users %> <%=@user.month%> <%=@user.year%> <%=@user.records%> <% end %>
<%=date_select(:date,'',:start_year => 1950,:include_blank => false, :default => { :year => '1970' })%> def convert_date(obj) return “#{obj[‘(1i)’]}-#{obj[‘(2i)’]}-#{obj[‘(3i)’]}” end