This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
# mongodb Startup script for the mongodb _config_ server | |
# | |
# chkconfig: - 64 36 | |
# description: MongoDB Database Configuration Server | |
# processname: mongodb | |
#Source function library | |
. /etc/rc.d/init.d/functions |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'digest/sha2' | |
require 'base64' | |
require 'mcrypt' # 需要 php5-mcrypt libmcrypt-dev libmcrypt | |
class EncryptionService | |
prepend SimpleCommand # 可在 rails controller 簡單呼叫這個 library 的 plugin | |
def initialize(payload) # 將前台的動態資訊組好後丟進來 | |
@payload = payload | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
require 'optparse' | |
require 'bigdecimal' | |
class FollowupBetting | |
@@price = 5.98 # 賠率 | |
@@bet_amt = 2 # 注金 | |
@@init_multiplier = 1 # 起始倍率 | |
@@spending = 0 | |
@@amt_spent = 0 # 累計投入 |