根据启动Bash Shell的方式不同,对Shell有两种分类方式
根据Shell的启动方式不同,可以将Shell分为
| require "httparty" | |
| require "csv" | |
| require "nokogiri" | |
| class Asin | |
| attr_accessor :rank, :asin | |
| def initialize(params) | |
| @rank = params[:rank] |
| public static List<Title> parseHtml(String name) { | |
| List<Title> lists = new ArrayList<Title>(); | |
| //URL | |
| String getUrl = "http://www.reddit.com/"; | |
| if(name!=null) { | |
| getUrl=getUrl+"/search?q="+name; | |
| } | |
| //标记选取规则 | |
| String g1 = ".title >a"; | |
| //属性选取规则 |
| require 'HTTParty' | |
| class PageView | |
| # 引入 HTTParty gem | |
| include HTTParty | |
| # 发起模拟访问 | |
| def visit_page | |
| PageView.get("http://www.amazon.co.uk/dp/B006FRD8QU") |
| require 'nokogiri' | |
| xml = %q(<root> | |
| <sitcoms> | |
| <sitcom> | |
| <name>Married with Children</name> | |
| <characters> | |
| <character>Al Bundy</character> | |
| <character>Bud Bundy</character> | |
| <character>Marcy Darcy</character> |
| require 'nokogiri' | |
| html = %q( | |
| <td class="data-display-field" width="60%"> | |
| <a href="https://sellercentral.amazon.co.uk/gp/orders-v2/contact?ie=UTF8&buyerID=ABAZTC59A7Z12&orderID=205-7265948-3023534">Syed Ali</a> | |
| <span id="_myo_buyerEmail_progressIndicator" style="vertical-align: middle; display: none;"> | |
| <img src="https://images-na.ssl-images-amazon.com/images/G/02/rainier/ajax/snake._V192262569_.gif" id="_myo_buyerEmail_loadingBar" style="display:inline"> | |
| </span> | |
| <b id="_myo_buyerEmail_showRepeatOrders" buyeremail="[email protected]" class="tiny"> </b> | |
| </td>) |
| # refs https://docs.docker.com/v1.8/linux/step_one/ | |
| # oneline: | |
| # wget -qO- https://get.docker.com/ | sh | |
| require 'sshkit' | |
| require 'sshkit/dsl' | |
| # 例如 [email protected]; 记得需要 ssh 免密码登陆 | |
| SERVER = ENV.delete('H') |
| # uname -a: Linux abc 3.13.0-24-generic #46-Ubuntu SMP Thu Apr 10 19:11:08 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux | |
| # docker version | |
| # Client version: 1.1.2 | |
| # Client API version: 1.13 | |
| # Go version (client): go1.2.1 | |
| # Git commit (client): d84a070 | |
| # Server version: 1.1.2 | |
| # Server API version: 1.13 | |
| # Go version (server): go1.2.1 |
| auth_param basic program /usr/lib/squid3/basic_ncsa_auth /etc/squid3/passwd | |
| auth_param basic children 200 startup=0 idle=1 | |
| auth_param basic realm Squid proxy-caching web server | |
| auth_param basic credentialsttl 2 hours | |
| auth_param basic casesensitive off | |
| acl ncsa_users proxy_auth REQUIRED | |
| http_access deny !ncsa_users | |
| http_access allow ncsa_users | |
| acl SSL_ports port 443 | |
| acl Safe_ports port 80 # http |
| frontend=0.0.0.0,443 | |
| backend=127.0.0.1,8081 | |
| workers=2 | |
| private-key-file=/etc/squid3/server.key | |
| certificate-file=/etc/squid3/server.crt | |
| http2-proxy=yes | |
| add-x-forwarded-for=no | |
| no-via=yes | |
| no-ocsp=yes |