Skip to content

Instantly share code, notes, and snippets.

@forthxu
forthxu / test google ips
Last active August 29, 2015 14:02
google g-f-w pings
#!/usr/bin/python
#-*- coding:utf8 -*-
'''
Created on 2014-06-02
# QQ:263967133
# pings运行一般运行一次就够了,自己选一个ip段
# google ip地址段
# 64.233.160.0 - 64.233.191.255
# 66.102.0.0 - 66.102.15.255
@forthxu
forthxu / zaoan.sh
Created January 7, 2015 15:57
播放一首音乐然后 叫你起床 连续三遍 都是随机的
#!/bin/bash
#叫床声可以去www.nsjnqc.com找或百度
files_dir='/workspace/work/other/zaoan/';
musics_dir='/workspace/work/other/mp3/';
i=0;
j=0;
files=();
musics=();
for file in $(ls ${files_dir});do
@forthxu
forthxu / wanan.sh
Created January 7, 2015 15:59
晚安版
#!/bin/bash
musics_dir='/workspace/work/other/mp3/';
j=0;
musics=();
for file in $(ls ${musics_dir});do
musics[$j]=$file;
let "j+=1";
done
@forthxu
forthxu / redis-server
Last active August 29, 2015 14:14 — forked from tessro/redis-server
#!/bin/sh
#
# redis - this script starts and stops the redis-server daemon
#
# chkconfig: - 85 15
# description: Redis is a persistent key-value database
# processname: redis-server
# config: /etc/redis/redis.conf
# config: /etc/sysconfig/redis
# pidfile: /var/run/redis.pid
@forthxu
forthxu / Pagination.php
Created February 13, 2015 09:30
php独立分页类
<?php
/**
* @Date : 13-12-5 下午12:46
* @File : Pagination.php
* @Desc :
*  *  独立分页类
*  *  调用方式:
*  *  $pagenation = new Pagination( 4, 10, 200 ); // 4(第一个参数) = currentPage, 10(第二个参数) = pageSize, 200(第三个参数) = 总数
*  *  $pagenation->set_link( 'http://www.exmple.com' );
*  *  echo $pagenation->create();
@forthxu
forthxu / medoo.php
Created February 13, 2015 09:31
The lightest PHP database framework to accelerate development
<?php
/*!
* Medoo database framework
* http://medoo.in
* Version 0.9.6
*
* Copyright 2014, Angel Lai
* Released under the MIT license
*/
class medoo
@forthxu
forthxu / http.php
Created February 13, 2015 09:38
PHP开http服务
<?php
trait http{
private $max_read = 8192;
private $software = 'Kws/1.0 (By King)';
private $charset = 'utf-8';
private $headers = [
'_http'=>'HTTP/1.1 %d %s',
'_type'=>'Content-type:%s',
@forthxu
forthxu / http.php
Created February 13, 2015 09:41
PHP开http服务
<?php
trait http{
private $max_read = 8192;
private $software = 'Kws/1.0 (By King)';
private $charset = 'utf-8';
private $headers = [
'_http'=>'HTTP/1.1 %d %s',
'_type'=>'Content-type:%s',
@forthxu
forthxu / YafTemplate.php
Created February 13, 2015 09:42
yaf基础模板类
<?php
namespace Util;
class YafTemplate implements \Yaf\View_Interface{
private $style = ''; //当前生效的风格,用于缓存目录
private $mConfig = array(
'path' => '', //模板目录,绝对地址即在当前地址上加模块目录,
'suffix' => 'html', //模板后缀
'divide' => '/', //模板分割符,控制器和方法中间的分割符,
@forthxu
forthxu / README.md
Last active August 29, 2015 14:17 — forked from chuangbo/README.md

替换上你的Email,密码,域名ID,记录ID等参数,就可以运行了。 会在后台一直运行,每隔30秒检查一遍IP,如果修改了就更新IP。

获得domain_id可以用curl curl -k https://dnsapi.cn/Domain.List -d "login_email=xxx&login_password=xxx"

获得record_id类似 curl -k https://dnsapi.cn/Record.List -d "login_email=xxx&amp;login_password=xxx&amp;domain_id=xxx"