替换上你的 API Token,域名ID,记录ID等参数,就可以运行了。 会在后台一直运行,每隔30秒检查一遍IP,如果修改了就更新IP。
获得 domain_id 可以用 curl
curl -k https://dnsapi.cn/Domain.List -d "login_token=TOKEN"`| Why is there no such DataImportHandler thing in ElasticSearch? Uhm, well ... but because: | |
| 1. You should really consider your own scripts | |
| (be it jvm based, perl, ruby, php, nodejs/javascript) | |
| to feed ElasticSearch via bulk indexing: | |
| http://www.elasticsearch.org/guide/reference/java-api/bulk.html | |
| 2. There are two projects doing it already: | |
| * http://code.google.com/p/sql-to-nosql-importer/ | |
| * https://github.com/Aconex/scrutineer (keeps DB in synch with ES or solr!) |
| /* | |
| * Metadata - jQuery plugin for parsing metadata from elements | |
| * | |
| * Copyright (c) 2006 John Resig, Yehuda Katz, J�örn Zaefferer, Paul McLanahan | |
| * | |
| * Dual licensed under the MIT and GPL licenses: | |
| * http://www.opensource.org/licenses/mit-license.php | |
| * http://www.gnu.org/licenses/gpl.html | |
| * | |
| * Revision: $Id: jquery.metadata.js 3640 2007-10-11 18:34:38Z pmclanahan $ |
替换上你的 API Token,域名ID,记录ID等参数,就可以运行了。 会在后台一直运行,每隔30秒检查一遍IP,如果修改了就更新IP。
获得 domain_id 可以用 curl
curl -k https://dnsapi.cn/Domain.List -d "login_token=TOKEN"`| # Configure colors, if available. | |
| if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then | |
| c_reset='\[\e[0m\]' | |
| c_user='\[\e[0;32m\]' | |
| c_path='\[\e[1;34m\]' | |
| c_git_clean='\[\e[0;37m\]' | |
| c_git_staged='\[\e[0;32m\]' | |
| c_git_unstaged='\[\e[0;31m\]' | |
| else | |
| c_reset= |
| if ['2.3.8', '2.3.9', '2.3.10', '2.3.11'].include?(Rails.version) && Gem.available?('mongrel', '~>1.1.5') && self.class.const_defined?(:Mongrel) | |
| # Pulled right from latest rack. Old looked like this in 1.1.0 version. | |
| # | |
| # def [](k) | |
| # super(@names[k] ||= @names[k.downcase]) | |
| # end | |
| # | |
| module Rack | |
| module Utils |
| import fcntl | |
| import os | |
| import struct | |
| import subprocess | |
| # Some constants used to ioctl the device file. I got them by a simple C | |
| # program. | |
| TUNSETIFF = 0x400454ca | |
| TUNSETOWNER = TUNSETIFF + 2 |
| <?php | |
| /* | |
| * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | |
| * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | |
| * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | |
| * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | |
| * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | |
| * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | |
| * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |