This file contains hidden or 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 | |
| ### BEGIN INIT INFO | |
| # Provides: delayed_job | |
| # Required-Start: $all | |
| # Required-Stop: $local_fs $syslog | |
| # Default-Start: 2 3 4 5 | |
| # Default-Stop: 0 1 6 | |
| # Short-Description: starts the delayed_job instances | |
| # Description: starts the delayed_job server instances using start-stop-daemon | |
| # |
This file contains hidden or 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
| # config/deploy.rb | |
| require 'mina/bundler' | |
| require 'mina/rails' | |
| require 'mina/git' | |
| require 'mina/rvm' | |
| # ter_mode 这个要设置,不然在 mac 下输密码有问题 | |
| set :term_mode, nil | |
| set :rvm_path, '/usr/local/rvm/bin/rvm' |
This file contains hidden or 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 'csv' | |
| class PartRequestsController < ApplicationController | |
| def render_csv_header(filename = nil) | |
| filename ||= params[:action] | |
| filename += '.csv' | |
| if request.env['HTTP_USER_AGENT'] =~ /msie/i | |
| headers['Pragma'] = 'public' | |
| headers["Content-type"] = "text/plain" | |
| headers['Cache-Control'] = 'no-cache, must-revalidate, post-check=0, pre-check=0' |
This file contains hidden or 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
| ############################################################################### | |
| ## Monit control file | |
| ############################################################################### | |
| ## | |
| ## Comments begin with a '#' and extend through the end of the line. Keywords | |
| ## are case insensitive. All path's MUST BE FULLY QUALIFIED, starting with '/'. | |
| ## | |
| ## Below you will find examples of some frequently used statements. For | |
| ## information about the control file, a complete list of statements and | |
| ## options please have a look in the monit manual. |
This file contains hidden or 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
| http://localhost:3000/categories/52733fcf7562750fa90d0000/csvfiles/52a04c1b7562751509770500/download | |
| source : sourceUploader | |
| <%= @csvfile.source.url %> | |
| <%= @csvfile.source_identifier %> | |
| <%= @csvfile.source.current_path %> |
This file contains hidden or 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
| 更改CentOS镜像为国内镜像 | |
| 2011-06-21 12:22:51| 分类: LINUX |字号 订阅 | |
| 国内镜像地址: | |
| http://mirrors.163.com/centos/ 。(网易) | |
| 我们就用 http://mirrors.163.com/centos/ 网易)来修改配置文件 | |
| 方法一: |
This file contains hidden or 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
| ## Configure eth0 | |
| # | |
| # vi /etc/sysconfig/network-scripts/ifcfg-eth0 | |
| DEVICE="eth0" | |
| NM_CONTROLLED="yes" | |
| ONBOOT=yes | |
| HWADDR=A4:BA:DB:37:F1:04 | |
| TYPE=Ethernet | |
| BOOTPROTO=static |
This file contains hidden or 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/bash | |
| #This is a ShellScript For Auto DB Backup | |
| #Setting | |
| DBName=mantis | |
| DBUser=root | |
| DBPasswd=×××(填写root密码) | |
| BackupPath=/usr/fj/mantis/ | |
| LogFile=/usr/fj/mantis.log |
This file contains hidden or 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
| ssh-keygen -t rsa | |
| scp id_rsa.pub user@remote_ip:~/.ssh/authorized_keys |
This file contains hidden or 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
| unicorn_rails -E development -c /home/hw/balingpei/config/unicorn.rb |
NewerOlder