Original: https://github.com/digaev/stale_options StaleOptions    A gem for caching HTTP responses. The gem was built with an idea to implement a class which will create options for ActionController::ConditionalGet#stale? method. It allows to cache any kind of object, not only record or collection (unlike of #stale?). Installation Usage Caching options Examples Controller helpers Contributing License Installation… Continue Reading [Reproduce]Ruby Gem – digaev/stale_options: A Ruby gem for caching HTTP responses

Original: https://github.com/janko-m/down Down Down is a utility tool for streaming, flexible and safe downloading of remote files. It can use open-uri + Net::HTTP, HTTP.rb or wget as the backend HTTP library. Installation gem “down”, “~> 4.4” Downloading The primary method is Down.download, which downloads the remote file into a Tempfile: require “down” tempfile = Down.download(“http://example.com/nature.jpg”) tempfile #=> #<Tempfile:/var/folders/k7/6zx6dx6x7ys3rv3srh0nyfj00000gn/T/20150925-55456-z7vxqz.jpg> Metadata… Continue Reading Ruby Gem – janko-m/down: Streaming downloads using net/http, http.rb or wget

HTTP/2 is a replacement for how HTTP is expressed “on the wire.” It is not a ground-up rewrite of the protocol; HTTP methods, status codes and semantics are the same, and it should be possible to use the same APIs as HTTP/1.x (possibly with some small additions) to represent the… Continue Reading HTTP/2简介与基于HTTP/2的Web优化

When testing Rails applications, two of the most significant performance bottlenecks are accessing the database and loading Rails itself. RSpec Mocks and other mocking frameworks give us the tools to avoid these bottlenecks by allowing us to mock our Rails models, but doing so can be tedious. 1. ActiveMocker ActiveMocker… Continue Reading Ruby Gem – zeisler/active_mocker

Thursday, December 07 2017 The JRuby community is pleased to announce the release of JRuby Homepage: http://www.jruby.org/ Download: http://www.jruby.org/download JRuby 9.1.x is our current major version of JRuby. It is expected to be compatible with Ruby 2.3.x and stay in sync with C Ruby. JRuby is our latest release… 1.… Continue Reading JRuby Released

Both GitLab CE and EE are in Docker Hub: GitLab CE Docker image GitLab EE Docker image The GitLab Docker images are monolithic images of GitLab running all the necessary services on a single container. Prerequisites Docker installation is required, see the official installation docs Docker Compose is required, see the Install… Continue Reading Install Gitlab CE with Docker Compose

Nginx命令帮助如下 $ /opt/ngx/sbin/nginx -h nginx version: nginx/0.8.45 Usage: nginx [-?hvVt] [-s signal] [-c filename] [-p prefix] [-g directives] Options: -?,-h : this help // 帮助 -v : show version and exit // 显示版本 -V : show version and configure options then exit // 显示版本及配置选项 -t : test configuration and exit… Continue Reading Nginx命令帮助