name | 供应商名称 | varchar(255) |
address | 供应商地址 | varchar(255) |
telephone | 供应商电话 | varchar(50) |
description | 供应商简介 | text |
work_time | 供应商工作时间 | varchar(50) |
wokr_qq_list | 供应商工作客服QQ列表 | varchar(100) |
---|
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/bash | |
# bash script for installing Rails environment on Ubuntu 12.04 Server | |
# | |
# Some sources has been changed to mirrors in China mainland. | |
# | |
# To use this script, do this in your shell: | |
# | |
# $ curl -L https://raw.github.com/gist/2521307/install-rails-12-04-server.sh | bash |
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 'bundler/capistrano' #添加之后部署时会调用bundle install, 如果不需要就可以注释掉 | |
require "capistrano/ext/multistage" #多stage部署所需 | |
set :stages, %w(development production) | |
set :default_stage, "development" | |
set :application, "crm_app_end" #应用名称 | |
set :repository, "https://chang.abc.com/svn/engineering/vwaccount/mydeploy/trunk" |
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
= IMAGEMAGICK | |
Working with images, PDFs and the command line | |
# convert from one format to another | |
convert image.gif image.jpg | |
# convert specific PDF page to image |
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
ActiveAdmin.register Event do | |
#Menu display index | |
menu :priority => 1 | |
#Scopes | |
scope :all | |
scope :pending | |
scope :approved | |
scope :rejected | |
scope :cancelled |
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
(defvar mode-line-cleaner-alist | |
`((auto-complete-mode . " α") | |
(yas/minor-mode . " υ") | |
(paredit-mode . " π") | |
(eldoc-mode . "") | |
(abbrev-mode . "") | |
;; Major modes | |
(lisp-interaction-mode . "λ") | |
(hi-lock-mode . "") | |
(python-mode . "Py") |
- Git Community Book 中文版 – 这个要经常翻翻
# 配置文件
$ git config --global user.name "Scott Chacon"
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
$(document).ready(function() { | |
$('a.loginll').click(function(){ | |
if ($('a#all').hasClass("active")) { | |
$('a#all').removeClass("active"); | |
$(this).addClass("active"); | |
} | |
else { | |
$(this).toggleClass("active"); | |
} |
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
class ApplicationController < ActionController::Base | |
# ... | |
unless Rails.application.config.consider_all_requests_local | |
rescue_from Exception, with: lambda { |exception| render_error 500, exception } | |
rescue_from ActionController::RoutingError, ActionController::UnknownController, ::AbstractController::ActionNotFound, ActiveRecord::RecordNotFound, with: lambda { |exception| render_error 404, exception } | |
end | |
private | |
def render_error(status, exception) |
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
function makeAdder(x) { | |
return function(y) { | |
return x + y; | |
}; | |
} | |
var add5 = makeAdder(5); | |
var add10 = makeAdder(10); | |
print(add5(2)); // 7 |
OlderNewer