AutoProxy 代理规则
- 查看
- 修订版本
Posted in
- AutoProxy
- gfwList
- Rule
namespace :deploy do | |
namespace :assets do | |
task :precompile, :roles => :web, :except => { :no_release => true } do | |
if capture("cd #{latest_release} && #{source.local.log(source.next_revision(current_revision))} vendor/assets/ lib/assets/ app/assets/ | wc -l").to_i > 0 | |
run "cd #{latest_release} && #{rake} RAILS_ENV=#{rails_env} #{asset_env} assets:precompile" | |
else | |
logger.info "No changes on assets. Skipping pre-compilation." | |
end | |
end | |
end |
$ chmod +x ./proxy_list_fetcher.rb | |
$ ./proxy_list_fetcher.rb | head | |
180.94.88.58 8080 Afghanistan fast HTTPS High +KA | |
187.87.155.2 8080 Brazil fast HTTPS High +KA | |
120.132.132.119 8080 China medium HTTPS High +KA | |
210.211.109.244 8081 Viet Nam fast HTTP Low | |
216.244.71.143 3128 United States medium HTTPS High +KA | |
190.237.224.22 8080 Peru slow HTTPS High +KA |
# | |
# Initialize the stuff | |
# | |
# We build the status bar item menu | |
def setupMenu | |
menu = NSMenu.new | |
menu.initWithTitle 'FooApp' | |
mi = NSMenuItem.new | |
mi.title = 'Hellow from MacRuby!' | |
mi.action = 'sayHello:' |
$KCODE = 'u' | |
# Goal: 小写金额转换为大写金额 | |
# Limit: 金额整数位支持到亿位,小数点后支持两位并且不支持四舍五入 | |
class ChineseFee | |
attr_reader :chn_numbers, :chn_units, :chn_decimals | |
def initialize | |
@chn_numbers = %w(零 壹 贰 叁 肆 伍 陆 柒 捌 玖) | |
@chn_units = %w(元 拾 佰 仟 万 拾万 佰万 仟万 亿) |
require 'watir-webdriver' | |
capabilities = Selenium::WebDriver::Remote::Capabilities.phantomjs("phantomjs.page.settings.userAgent" => "Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1468.0 Safari/537.36") | |
driver = Selenium::WebDriver.for :phantomjs, :desired_capabilities => capabilities | |
browser = ::Watir::Browser.new driver | |
# Quick test to make sure it's set | |
browser.goto 'http://www.useragentstring.com/' | |
browser.textarea(:id => "uas_textfeld").value |
AutoProxy 代理规则
Posted in
test: | |
adapter: sqlite3 | |
encoding: utf8 | |
pool: 5 | |
timeout: 5000 | |
database: ":memory:" | |
verbosity: quiet |
Convenience function for performing a groupBy
on a list then a sortBy
on the resulting groups using Underscore methods.
sortedGroupBy(list, groupByIterator, sortByIterator)
language: android | |
android: | |
components: | |
# Uncomment the lines below if you want to | |
# use the latest revision of Android SDK Tools | |
- platform-tools | |
- tools | |
# The BuildTools version used by your project | |
- build-tools-22.0.0 |