Ruby China
  • Topics
  • 招聘
  • Wiki
  • 酷站
  • Gems
  • Sign Up
  • Sign In
@gihnius
Member
NO. 6061 / 2013-03-10

广州
31 Topics / 335 Replies
5 Followers
0 Following
52 Favorites
GitHub Public Repos
  • jquery.qeditor 35

    This is a simple WYSIWYG editor with jQuery.

  • http-pinger 20

    A simple tool to check website status and notify via email.

  • cl-common-blog 18

    a blog engine written in common lisp

  • gomemoize 11

    memoization function in Go

  • hunchentoot-secure-cookie 9

    encodes and decodes authenticated and optionally encrypted cookie values.

  • freebsd-wifi 7

  • ht-routes 7

    route mapping and dispatching URL's for Hunchentoot in Common Lisp.

  • gosanitize 6

    Gosanitize is a whitelist-based HTML sanitizer in Go language. Given a list of acceptable element...

  • rdb-backup 5

    redis rdb backup

  • redis_online_counter 5

    Counting online users with Redis and Go.

More on GitHub
  • Overview
  • Topics
  • Replies
  • Favorites
  • Following
  • Followers
  • File.write (filename, text) 是否线程安全? at April 20, 2015

    不是很了解 GIL,没有找到明确的说明,但愿是线程安全的。

    刚翻了下,rails 有实现 File.atomic_write here,ruby 2.2 的 logger 依然用 Mutex:

    
    def write(message)
      begin
        @mutex.synchronize do
          if @shift_age and @dev.respond_to?(:stat)
            begin
              check_shift_log
            rescue
              warn("log shifting failed. #{$!}")
            end
          end
          begin
            @dev.write(message)
          rescue
            warn("log writing failed. #{$!}")
          end
        end
      rescue Exception => ignored
        warn("log writing failed. #{ignored}")
      end
    end
    
  • File.write (filename, text) 是否线程安全? at April 19, 2015

    貌似 ruby 内置的类都不是 thread safe 的,IO, File 应该更不是。

  • rails scaffold 有没有后悔药 at April 13, 2015

    Git

  • [楼主经历分享] 自由职业的第一步: 200 元与 200 美刀 at April 12, 2015

    cool

  • 为什么搜索栏里一搜就挂了? at March 16, 2015

    #1 楼 @lgn21st 偶有发现,是 server 50x 开挂,因为那个搜索竟然还经过 controler#search. 或者干脆直接用 js?

  • 如何限制文章的评论个数? at March 06, 2015

    在 article 加个 comments_count 是不是更简单?

  • [远程办公][12-20K] 彩程设计招聘 Ruby 工程师 at February 09, 2015

    支持远程。

  • Emacs 最右下角多了一个空格 at February 07, 2015

    这是在 mode line 上面的吗?

  • 如何选择 JavaScript 模板? at January 25, 2015

    http://ectjs.com 号称什么 Excellent performance,Fastest ... 复杂的 template 可以用 ect. 简单些的可以用 underscore.js 再简单的可以用 coffeescript 字符串内插,比 js 拼接字符串方便一些。

  • Go 的 web 应用如何结合 AngularJS at January 11, 2015

    #2 楼 @cjstudio #3 楼 @fundon 是呀,如果用 Go 干脆直接做 API,html/template 性能不佳。

  • Go 的 web 应用如何结合 AngularJS at January 11, 2015

    go 内置的 pkg html/template 可以自定义模板的 delimiter, 好像叫 template.Delims

  • Apple 的工具居然有用 Ruby 写的 at January 11, 2015

    applie 还用 lisp(scheme) 呢:

    /usr/share/sandbox/ftp-proxy.sb

    ;;
    ;; ftp proxy - sandbox profile
    ;; Copyright (c) 2010 Apple Inc.  All Rights reserved.
    ;;
    ;; WARNING: The sandbox rules in this file currently constitute 
    ;; Apple System Private Interface and are subject to change at any time and
    ;; without notice. The contents of this file are also auto-generated and not                                            
    ;; user editable; it may be overwritten at any time.
    ;;
    (version 1)
    
    (deny default)
    
    (import "system.sb")
    
    (allow ipc-posix-shm
        (ipc-posix-name "apple.shm.notification_center"))
    
    (allow mach-lookup
           (global-name "com.apple.networkd")
           (global-name "com.apple.NetworkSharing")
           (global-name "com.apple.pfd"))
    
    (allow mach-per-user-lookup)
    
    (system-network)
    (allow network* (local ip))
    
    (allow system-socket)
    

    会 lisp 可以自己写一些 profile 来跑那些不是很信任的程序。

  • [广州][2014年12月27日] GZRUBY 第 22 次聚会 - 15:00 (持续更新主题中...) at December 25, 2014

    😄 有时间去凑一下热闹。

  • 在这种出现 routes 冲突时大家会怎样做呢? at December 16, 2014

    /@username 比较时髦

  • 广州和厦门 10k 月薪是什么水平,Rails. at December 16, 2014

    看你期待的是多少很重要。

  • 什么情况下不使用 turbolinks? at December 07, 2014

    你引用的 js 都在你的掌控下就用,有些 js 动态加载更多的 js 基本上没戏。

  • Mina 如何 使用 git pull 而不是 git clone? at November 25, 2014

    应该可以改,不过不推荐使用 git pull,用 git fetch + git reset 代替。 然后更新后可以 git archive 到新版本的目录。可行,有空试试

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

    #6 楼 @linjunzhugg 如果不行,这样应该可以的:

    task :to_svr1 do
      set :domain, "svr1"
    end
    
    task :to_svr2 do
      set :domain, "svr2"
    end
    
    # 不过也要分开调用:
    
    $ mina to_svr1 deploy
    $ mina to_svr2 deploy
    
    
  • 使用 Mina 部署时的错误 (SOS!!) at November 23, 2014

    #6 楼 @linjunzhugg 类似这样,不过我还没试过,

    
    set :servers, ['svr1', 'svr2', 'svr3']
    
    task :deploy_all do
      servers.each do |s|
        set :domain, s
        invoke 'deploy'
        ...
      end
    end 
    
  • 使用 Mina 部署时的错误 (SOS!!) at November 23, 2014

    #1 楼 @xyuwang 再写个 task 在里面就可以多次 invoke deploy,不用运行 min deploy 多次

  • 大家都用什么备份方案? at November 22, 2014

    S3 便宜,稳定

  • 推荐一个监控进程情况的库(不是框架)? at November 20, 2014

    ps 满足 1,2,3,4 😄

  • nohup rvm ruby 不知为何不能运行 at November 13, 2014

    #1 楼 @hisea #2 楼 @wujian_hit 我怀疑楼主正是在 tmux 内运行这个命令吧!?

  • 在 rails 中,自定义的 exception,放在哪比较好呢 at November 13, 2014

    app/classes/

  • 想写技术博客,求推荐网站 at November 03, 2014

    楼主看看这个:https://www.padory.com/

  • [已解决] 服务器无法安装 mysql2+ 无法 db:migrate at October 31, 2014

    #26 楼 @chairy11 这个 libmysqlclient_r.so.16 => not found 在 /usr/lib64/mysql 有没有?没有的话就重新安装 mysql 吧,可能都被搞得一塌糊涂了。

  • [已解决] 服务器无法安装 mysql2+ 无法 db:migrate at October 31, 2014

    #26 楼 @chairy11 这个 libmysqlclient_r.so.16 => not found 在 /usr/lib64/mysql 有没有?没有的话就重新安装 mysql 吧,可能都被搞得一塌糊涂了。

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