Ruby China
  • 社区
  • 招聘
  • Wiki
  • 酷站
  • Gems
  • 注册
  • 登录
Howl王
@mimosa
高级会员
第 5 位会员 / 2011-10-28

Autodesk
上海
39 篇帖子 / 570 条回帖
46 关注者
19 正在关注
42 收藏
┬─┬ノ❨°_°ノ❩ ..persecution mania
GitHub Public Repos
  • ansj_seg 6

  • docker-tengine 3

  • grape-erb 2

    Use erb in grape

  • shrine-tus-demo 1

    Demo integrating tus with Shrine

  • ChatGPT-Next-Web 1

    A well-designed cross-platform ChatGPT UI (Web / PWA / Linux / Win / MacOS). 一键拥有你自己的跨平台 ChatGPT 应用。

  • rest_cli 1

  • codeowners-checker 0

    Check .github/CODEOWNERS consistency

  • gatsby-starter-portfol... 0

    Playful and Colorful One-Page portfolio featuring Parallax effects and animations. Especially des...

  • logstop 0

    Keep personally identifiable information (PII) out of your logs

  • readme-code-testing 0

    Helping test "any" code in readme with GitHub Action. All you need is unit testing synchronized e...

More on GitHub
  • 概况
  • 话题
  • 回帖
  • 收藏
  • 正在关注
  • 关注者
  • 利用 Postgres Pub/Sub机制,透过 EventSource 推送通知 at 2023年12月05日

    ActionCable 是 WebSocket 协议最好单独起服务,从兼容性考虑:

    • WebSocket 下沉至
      • Server-sent events (SSE) 再下沉至
        • HTTP Long Polling
  • Sidekiq 内存泄漏 at 2020年01月07日

    sidekiq-worker-killer

  • Homeland 可以加入夜间模式吗? at 2019年12月11日

    https://darkreader.org 自己调呀。

  • [上海][2019年09月17日] Ruby 默默会召集 at 2019年09月16日

    👍

  • 现在上海 Ruby 程序员好找吗? at 2019年05月20日

    难招是钱没给到位。

  • WebSocket 方案选择 at 2019年05月10日
    # Gemfile
    gem "anycable-rails", "~> 0.6.2"
    gem "google-protobuf", "~> 3.7"
    gem "jwt", "~> 2.1"
    
    # Procfile
    bundle exec anycable --server-command="anycable-go --headers=Upgrade,Host,Referer,User-Agent,X-Forwarded-For,X-Real-IP,X-Request-Id,Remote_addr,Origin,Connection,Authorization,Sec-WebSocket-Protocol,Sec-WebSocket-Key,Sec-WebSocket-Accept --host=localhost --port 3334"
    
    <script src="https://cdn.jsdelivr.net/npm/[email protected]/lib/assets/compiled/action_cable.min.js"></script>
    <script type="application/javascript">
      (function() {
        this.App || (this.App = {});
        App.initialize = (async () => {
          const accessToken = await getToken();
    
          ActionCable.INTERNAL.protocols.push(accessToken.auth.access_token);
    
          return ActionCable.createConsumer("ws://localhost:3334/cable");
        })();
      }).call(this);
      });
    </script>
    
    token =  request.headers["HTTP_SEC_WEBSOCKET_KEY"].to_s.split(", ").last
    
  • 去他的 RTFM, 只要 @kayakjiang 我有问必答,绝不敷衍 at 2019年04月30日

    牛逼!

    50 ~ 80 万年薪,Java 领域常见,再看看我们招聘板块,35 万顶天啦~(≧▽≦)/~啦啦啦

  • Ruby-vips 下通过 composite 进行 watermark 测试 at 2019年04月15日

    https://github.com/h2non/imaginary

  • 配置文件有可能热更新么 at 2019年03月18日
    # frozen_string_literal: true
    
    # Redis > .env > default
    # FeatureToggle.fetch('ROLE_MAPPING') { { "read" => ["list", "read"], "list" => ["list", "read", "write"] } }
    # FeatureToggle.fetch('WHITELIST') { ["23","33","43","53"] }
    # FeatureToggle.fetch('HACK_ENABLE') { false }
    module FeatureToggle
      class << self
        def fetch(key)
          return read(key) if exists?(key)
    
          load ENV.fetch(key.upcase) { block_given? ? yield : nil }
        end
    
        def read(key)
          data = client.get(key.upcase)
          data = ENV.fetch(key.upcase) { block_given? ? yield : nil } if data.nil?
          load data
        end
    
        def write(key)
          return nil unless block_given?
    
          data = yield
          body = data.is_a?(String) ? data : Oj.dump(data)
          client.set(key.upcase, body)
          data
        end
    
        def delete(key)
          if exists?(key)
            data = read(key)
            client.del(key.upcase)
            data
          end
        end
    
        def keys
          client.keys
        end
    
        private
    
          def load(data)
            return Oj.load(data) if json?(data)
            return data.to_b if bool?(data)
    
            data
          end
    
          def exists?(key)
            client.exists(key.upcase)
          end
    
          def json?(data)
            data =~ %r(^(\{|\[)(.*)(\]|\})$)
          end
    
          def bool?(data)
            data =~ %r((true|false|yes|no|on|off))i
          end
    
          def client
            @client ||= Redis::Namespace.new(NAMESPACE, redis: Redis.current)
          end
    
          # redis key
          NAMESPACE = [Rails.application.class.parent_name.underscore, Rails.env, "FeatureToggle"].join(":").freeze
      end
    end
    
  • ruby aws-sdk 搭配 minio server ,上传很慢 at 2019年03月07日

    tus-ruby-server

  • homeland 里关于 elastic search 异步任务的一个疑问 at 2018年08月10日
    app/models/concerns/soft_delete.rb
    
  • Ruby 用 jemalloc 有什么坑么? at 2018年05月01日

    这个人?他可是 sidekiq 的作者 😹

  • [上海][2018年03月20日] Ruby 聚会召集 at 2018年03月16日

    场地里不提供 WiFi😭

  • 给 activestorage 顺手撸了个七牛的 service at 2017年10月29日

    shrine + tus + minio

  • [上海] 牛牛汽车招聘 Rails 工程师 15-35K at 2017年08月09日

    行情😒

  • 全栈笔记:每天推荐几篇优质的全栈开发文章 (以及我对全栈的看法) at 2017年05月12日

    你自己搞个博客不如去“简书”开专栏🕵

  • 阅读 GitHub 仓库中项目源码的好帮手 at 2017年05月05日

    我用 Octotree 🕵

  • [上海] Autodesk 2017 春季招聘 (Ruby 职位) at 2017年04月20日

    最近招人的公司不少呢 🛰

  • [上海] Autodesk 2017 春季招聘 (Ruby 职位) at 2017年02月27日

    多谢 @Reigihnius 解答 👏

  • [上海] Autodesk 2017 春季招聘 (Ruby 职位) at 2017年02月22日

    #1 楼 @metrue Fixed. 💯

  • 使用 acme.sh 给 Nginx 安装 Let’ s Encrypt 提供的免费 SSL 证书 at 2017年01月02日

    @huacnlee

    # /etc/letsencrypt/options-ssl-nginx.conf
    ssl_session_cache shared:le_nginx_SSL:1m;
    ssl_session_timeout 1440m;
    
    ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
    ssl_prefer_server_ciphers on;
    
    ssl_ciphers "ECDHE-ECDSA-AES128-GCM-SHA256 ECDHE-ECDSA-AES256-GCM-SHA384 ECDHE-ECDSA-AES128-SHA ECDHE-ECDSA-AES256-SHA ECDHE-ECDSA-AES128-SHA256 ECDHE-ECDSA-AES256-SHA384 ECDHE-RSA-AES128-GCM-SHA256 ECDHE-RSA-AES256-GCM-SHA384 ECDHE-RSA-AES128-SHA ECDHE-RSA-AES128-SHA256 ECDHE-RSA-AES256-SHA384 DHE-RSA-AES128-GCM-SHA256 DHE-RSA-AES256-GCM-SHA384 DHE-RSA-AES128-SHA DHE-RSA-AES256-SHA DHE-RSA-AES128-SHA256 DHE-RSA-AES256-SHA256 EDH-RSA-DES-CBC3-SHA";
    
  • 迎合 simple-form 的,不与数据库关联的假模型 at 2016年12月25日

    https://github.com/trailblazer/reform 🍳

  • [上海][2016年12月20日] Ruby 聚会召集 at 2016年12月21日

    #59 楼 @JoostShao 已修改原贴,在主题上加了 ppt 的链接。

  • [上海][2016年12月20日] Ruby 聚会召集 at 2016年12月20日

    #48 楼 @tcstory 无国界,无门槛😼

  • 开启 Turbolinks 后,事件绑定问题如何解决? at 2016年12月17日
    $(document).on 'ready page:load', -> # 加载且缓存。
      App.config()
      App.init()
      return
    $(document).on 'page:change turbolinks:load', -> # 页面 change 后执行。
      if App.weixin()
        $('body').on 'click touchstart mousedown', 'a[href*="https://itunes.apple.com"]', (e) ->
          e.stopPropagation()
          e.preventDefault()
          $('#wechat-modal').modal 'show'
          return
      switch true
        when $('body.photos').length > 0
          photo = new (App.Photo)
          if $('.photos.index').length > 0
            photo.uploader()
            photo.index currentPage
        when $('body.episodes').length > 0
          episode = new (App.Episode)
          if $('.episodes.index').length > 0
            episode.index currentPage
          else if $('.episodes.show').length > 0
            App.hide_nav()
            episode.show episodeId
        when $('body.orders').length > 0
          order = new (App.Order)
          if $('.orders.index').length > 0
            order.index currentPage
          else if $('.orders.show').length > 0
            App.hide_nav()
            order.show orderId
      return
    
  • 用 Passenger Standalone 部署 Action Cable 过一段时间就断开然后就连不上了 at 2016年12月17日
    1. stop_all_streams 加在 stream_from 上面。
    2. ActionCable 需要独立运行。
    passenger_enabled on;
    passenger_app_env production;
    passenger_app_type rack;
    passenger_app_group_name websocket;
    passenger_startup_file /home/deploy/ruby/rails/<appname>/current/cable/config.ru;
    passenger_force_max_concurrent_requests_per_process 0
    

    cable/config.ru

    # -*- encoding: utf-8 -*-
    require ::File.expand_path('../../config/environment', __FILE__)
    
    Rails.application.eager_load!
    
    require 'action_cable/process/logging'
    
    # See https://www.phusionpassenger.com/library/config/tuning_sse_and_websockets/
    if defined?(::PhusionPassenger)
      PhusionPassenger.advertised_concurrency_level = 0
    end
    
    run ActionCable.server
    
  • 用 Passenger Standalone 部署 Action Cable 过一段时间就断开然后就连不上了 at 2016年12月14日

    passenger_force_max_concurrent_requests_per_process 0;

  • [上海][2016年12月20日] Ruby 聚会召集 at 2016年12月12日

    吱吱 👍

  • [上海][2016年12月20日] Ruby 聚会召集 at 2016年12月12日

    @xiaoronglv @zgm @gene_wu @tzwm @teddy_1004 @ericguo @ibachue @luoping0425 @tony612 @miclle @larryzhao @betterthornbird @runbigcat @mimosa @brewgeek @holysoros @123456-juan @dsh0416 @danielglh

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