Ruby China
  • Topics
  • 招聘
  • Wiki
  • 酷站
  • Gems
  • Sign Up
  • Sign In
Yuan Cheung
@zhangyuan
VIP
NO. 140 / 2011-11-20

北京
6 Topics / 558 Replies
10 Followers
0 Following
32 Favorites
I'm not the only one.
GitHub Public Repos
  • google-authenticator-e... 10

    A command line tool to extract secrets from Google Authenticator's QR code. 从 Google Authenticato...

  • proxymanager 2

    A simple tool to manage v2ray process and network proxy on MacOS

  • zender 1

    Compile templates written in Jinja, with metadata generated.

  • seo-helper 1

    A simple tool to generate SEO meta info with LLM.

  • dq 1

    A data quality check utility

  • amlogic-s9xxx-openwrt 0

    Support for OpenWrt in Amlogic, Rockchip and Allwinner boxes. Support a311d, s922x, s905x3, s905x...

  • securebin 0

    A simple application for sharing text securely with client side encryption.

  • git-server 0

    A simple demo for git server

  • qqwry-rs 0

    A library and program for IP address lookup using the qqwry.dat file.

  • stm32f103c8t6-blink-ar... 0

More on GitHub
  • Overview
  • Topics
  • Replies
  • Favorites
  • Following
  • Followers
  • 如何跳过 referer 验证,兼容主流浏览器 at January 12, 2018

    是想隐藏 referrer 吧。提供一个思路,除了那些标签的设置,为了兼容性,可能需要使用 data Uri 和 JavaScript 结合实现

  • 下载 PDF 会自己打开,怎么样才能只下载,不打开 at March 18, 2016

    试试在响应头里设置

    Content-Disposition: attachment; filename=xxxxx.pdf
    

    如果是 Nginx 处理的话,就要配置 Nginx,比如

    location ~ ^/uploads/(.*).pdf$ {
        add_header Content-Disposition "attachment; filename=$1.pdf";
    }
    
  • 关于 Rails 的 console reload!命令 at August 31, 2015
    module IRBExtensition
      def reload!
        puts "reloading..."
        ActiveSupport::Dependencies.clear
        nil 
      end 
    end
    
    IRB::ExtendCommandBundle.send :include, IRBExtensition
    
    IRB.start
    

    前提是你使用 ActiveSupport,并且利用它的 const missing 机制加载文件。

  • 为什么很少见有使用 DRuby 开发分布式应用的? at July 07, 2015

    god 用了它,给正在运行的 service 发送命令。

  • 根据实际的应用场景 Rails 其实还可以做到更极致的优化 at April 24, 2015

    #6 楼 @luikore 开发模式用 ActiveSupport::Cache::NullStore

  • ActiveSupport::Autoload 学习 at April 08, 2015

    Rails 实现自动加载,用到了 const_missing机制。和 Ruby 的load没有关系。

    Ruby 中的autoload不是线程安全的。

    eager load 路径里的文件,在加载框架初始化项目后就会加载。而不是处理请求的时候,才加载类,这样避免了线程安全问题。

  • 类似 dragonfly 这样 image on the fly 的图片实时处理服务,生产环境下靠谱么? at March 05, 2015

    有试过 zimg 吗?看起来性能不错的样子 https://github.com/buaazp/zimg

  • [已解决] Rails.logger 内部有锁吗? at February 01, 2015

    是线程安全的。楼主可以看 ruby 自带库里的 logger 源码

  • [北京] D 轮融资:AppAnnie 招聘 Back-End Engineer (ruby,python),16 天年假 + 期权。 at January 30, 2015

    这个公司,怎么一直在招聘。是业务扩张,要求高,还是留不住人呐

  • [远程] 福利 Groupon 招聘高级研发工程师 提供 L-1 Visa at January 02, 2015

    L1 持有人的家属可以在美国工作,子女享受美国免费教育福利。——这个比 H1B 好多了哇

  • 有没有什么手机可以 SSH 到服务器的方法呢? at December 28, 2014

    Google Play 上有 mosh 客户端,适合 3G 网络使用,不过某些地区不能下载

  • 求助:有没有 gem 包可以生成图片,js 库也可以 at December 25, 2014

    使用 CarrierWave 和 MiniMagick 合成多张图片、写文字 的例子

    https://gist.github.com/zhangyuan/5932220

  • 如何把 admin 的 routes 设置成其它名字 at December 22, 2014

    use :path option

  • 微信分享链接 是否有相应的 API 接口 at December 17, 2014

    #3 楼 @luffycn 基本信息不需要 点击授权

  • 奇怪的 NO. at December 09, 2014

    是 点号 引起的

  • rails 的编译的原则是什么 at November 27, 2014

    找到对应路由,放在 public 目录

  • 使用 Mina 部署时的错误 (SOS!!) at November 24, 2014

    more discussions here: https://github.com/mina-deploy/mina/issues/8

  • 一般你们需要多长时间熟悉公司的项目然后参加开发? at November 22, 2014

    结对编程的话,第一天哇

  • 请问一种奇怪的写法是怎么回事 at November 12, 2014

    这是前端模板吧?

  • 魔兽世界为啥不开放 Mac 客户端?! at November 12, 2014

    楼主试过吗?星际 2 是可以连国服的,都不用配置。

  • RubyConf《I’ ve shipped the code, what’ s next》的 slides at November 04, 2014

    也放在 slideshare 吧

  • RubyMotion Workshop 之 iOS 开发实战 at October 25, 2014

    报名 +1

  • [武汉][2014年10月25日] 社区活动第二弹 - Open Party。讲师、话题、场地,由你定! at September 29, 2014

    @xue98 好棒!

  • 看完这张图就可以解惑 MVP 是啥东东 at September 27, 2014

    每次迭代都交付有价值的功能

  • 可否知道其他 module 的__FILE__ at September 23, 2014

    #6 楼 @est 如果想查看方法的源码位置,可以在 Method 对象上,调用 source_location 方法:

    ActiveRecord::Base.method(:find).source_location
    
  • API 添加验证机制或者隐藏联系信息 at September 09, 2014

    很早以前就发现了,所以隐藏掉了…

  • Rack 有没有异常或 5xx 错误自动发邮件的 middleware? at September 03, 2014

    膜拜大神

  • bash: unicorn_rails -c /home/hadoop/src/jshop/config/unicorn.rb: 没有那个文件或目录 at August 31, 2014

    应该用 bundle exec unicorn_rails ..... 吧

  • 请教 watir 怎么在 click 后判断跳转的页面加载完毕 at August 29, 2014

    如果能用 javascript 判断当前页面,是否加载完毕,那么可以用 #exec_script_with_return 执行这段 js 来判断;如果没有完毕,然后不断重试,直到加载完毕。

  • 1
  • 2
  • 3
  • …
  • 18
  • 19
  • Next
关于 / RubyConf / Ruby 镜像 / RubyGems 镜像 / 活跃会员 / 组织 / API / 贡献者
由众多爱好者共同维护的 Ruby 中文社区,本站使用 Homeland 构建,并采用 Docker 部署。
服务器由 赞助 CDN 由 赞助
iOS 客户端 / Android 客户端 简体中文 / English