替换上你的 API Token,域名ID,记录ID等参数,就可以运行了。 会在后台一直运行,每隔30秒检查一遍IP,如果修改了就更新IP。
获得 domain_id 可以用 curl
curl -k https://dnsapi.cn/Domain.List -d "login_token=TOKEN"`
#! /bin/sh | |
### BEGIN INIT INFO | |
# Provides: supervisord | |
# Required-Start: $remote_fs | |
# Required-Stop: $remote_fs | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: Example initscript | |
# Description: This file should be used to construct scripts to be | |
# placed in /etc/init.d. |
import simplejson as json | |
import lxml | |
class objectJSONEncoder(json.JSONEncoder): | |
"""A specialized JSON encoder that can handle simple lxml objectify types | |
>>> from lxml import objectify | |
>>> obj = objectify.fromstring("<Book><price>1.50</price><author>W. Shakespeare</author></Book>") | |
>>> objectJSONEncoder().encode(obj) | |
'{"price": 1.5, "author": "W. Shakespeare"}' | |
""" |
from flask import Flask, request, redirect, url_for, make_response, abort | |
from werkzeug import secure_filename | |
from pymongo import Connection | |
from pymongo.objectid import ObjectId | |
from gridfs import GridFS | |
from gridfs.errors import NoFile | |
ALLOWED_EXTENSIONS = set(['txt', 'pdf', 'png', 'jpg', 'jpeg', 'gif']) | |
DB = Connection().gridfs_server_test | |
FS = GridFS(DB) |
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | |
<title>SoundCloud OAuth 2 User Agent Authentication Flow Demo</title> | |
<script type="text/javascript" charset="utf-8" src="javascript/jquery-1.4.2.js"></script> | |
<script type="text/javascript" charset="utf-8"> | |
$(function () { | |
var extractToken = function(hash) { |
替换上你的 API Token,域名ID,记录ID等参数,就可以运行了。 会在后台一直运行,每隔30秒检查一遍IP,如果修改了就更新IP。
获得 domain_id 可以用 curl
curl -k https://dnsapi.cn/Domain.List -d "login_token=TOKEN"`
Sublime Text 2 ships with a CLI called subl (why not "sublime", go figure). This utility is hidden in the following folder (assuming you installed Sublime in /Applications
like normal folk. If this following line opens Sublime Text for you, then bingo, you're ready.
open /Applications/Sublime\ Text\ 2.app/Contents/SharedSupport/bin/subl
You can find more (official) details about subl here: http://www.sublimetext.com/docs/2/osx_command_line.html
Prereq:
apt-get install zsh
apt-get install git-core
Getting zsh to work in ubuntu is weird, since sh
does not understand the source
command. So, you do this to install zsh
wget https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O - | zsh
from flask import Flask, request, redirect, url_for, make_response, abort | |
from mongoengine.fields import get_db | |
from bson import ObjectId | |
from gridfs import GridFS | |
from gridfs.errors import NoFile | |
from <your_app> import app | |
@app.route('/files/<oid>') | |
def serve_gridfs_file(oid): | |
try: |
<?xml version="1.0" encoding="UTF-8"?> | |
<opml version="1.0"> | |
<head> | |
<title>Google 阅读器中 udonmai 的订阅</title> | |
</head> | |
<body> | |
<outline text="Delicious/pongba/shared-reading" | |
title="Delicious/pongba/shared-reading" type="rss" | |
xmlUrl="http://feeds.delicious.com/v2/rss/pongba/shared-reading?count=15" htmlUrl="http://www.delicious.com/pongba/shared-reading"/> | |
<outline text="FeedzShare" title="FeedzShare" type="rss" |
http://www.raspberrypi.org/phpBB3/
在磁盘中创建备份目录 mkdir /media/usbdisk/mactimebak 推荐使用ext4分区(打开notime)
安装nettalk