This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// http://www.9lessons.info/2009/03/generate-xml-rss-feed-with-php.html | |
$items = array( | |
array('title' => 'aaa', 'link' => 'www.google.com', 'description' => 'aaaaaaaaaaa'), | |
array('title' => 'bbb', 'link' => 'www.yahoo.com', 'description' => 'bbbbbbbbbbb'), | |
); | |
header("Content-type: text/xml"); | |
echo "<?xml version='1.0' encoding='UTF-8'?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 最新HOSTS法去除优酷、爱奇艺等视频网站广告 http://www.oschina.net/code/snippet_1262919_27114 | |
#优酷 | |
127.0.0.1 atm.youku.com | |
127.0.0.1 Fvid.atm.youku.com | |
127.0.0.1 html.atm.youku.com | |
127.0.0.1 valb.atm.youku.com | |
127.0.0.1 valf.atm.youku.com | |
127.0.0.1 valo.atm.youku.com |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/sh | |
### BEGIN INIT INFO | |
# Provides: asplashscreen | |
# Required-Start: | |
# Required-Stop: | |
# Should-Start: | |
# Default-Start: S | |
# Default-Stop: | |
# Short-Description: Show custom splashscreen | |
# Description: Show custom splashscreen |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// 引用自:http://www.oschina.net/code/snippet_616067_22723?p=2#comments | |
// 调用方法http://../flv.php?url=http://v.youku.com/v_show/id_XMzg2OTQ3MjQw.html | |
// 似乎只支持低清晰度的视频地址 | |
echo fetch_youku_flv($_GET['url']); | |
function fetch_youku_flv($url){ | |
preg_match("#id_(.*?)\.html#",$url,$out); | |
$id=$out[1]; | |
$content=get_curl_contents('http://v.youku.com/player/getPlayList/VideoIDS/'.$id); | |
$data=json_decode($content); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 微信公众平台 fakeid 爬取 | |
* Usage: casperjs test.js 123456@qq.com password | |
* # phantomjs --version | |
* 1.9.7 | |
* # casperjs --version | |
* 1.1.0-beta3 | |
--ignore-ssl-errors=yes ??? | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
#----------------------------------- | |
# Send SMS Text Message | |
# | |
# Author : Matt Hawkins | |
# Site : http://www.raspberrypi-spy.co.uk/ | |
# Date : 30/08/2012 | |
# | |
# Requires account with TxtLocal | |
# http://www.txtlocal.co.uk/?tlrx=114032 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//授权回调页面,即配置文件中的$callback_url | |
session_start(); | |
require_once('config.php'); | |
require_once('qq.php'); | |
if(isset($_GET['code']) && trim($_GET['code'])!=''){ | |
$qq=new qqPHP($qq_k, $qq_s); | |
$result=$qq->access_token($callback_url, $_GET['code']); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/sh | |
# /etc/init.d/noip | |
### BEGIN INIT INFO | |
# Provides: noip | |
# Required-Start: $remote_fs $syslog | |
# Required-Stop: $remote_fs $syslog | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: Simple script to start a program at boot |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<HTML><HEAD> | |
<!-- codz by LANKER(QQ:18779569) 2005/1/1--> | |
<META content="text/html; charset=gb2312" http-equiv=Content-Type> | |
<META content="MSHTML 5.00.2614.3500" name=GENERATOR> | |
<style> | |
<!-- | |
td {font-size:8pt; color: #666666;font-family:Verdana} | |
INPUT {font-size:9pt;BORDER-RIGHT: #cccccc 1px solid; BORDER-TOP: #cccccc 1px solid; BORDER-LEFT: #cccccc 1px solid; COLOR: #666666; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #ffffff} | |
textarea {font-size:9pt;BORDER-RIGHT: #cccccc 1px solid; BORDER-TOP: #cccccc 1px solid; BORDER-LEFT: #cccccc 1px solid; COLOR: #666666; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #ffffff} | |
select {font-size:9pt;BORDER-RIGHT: #cccccc 1px solid; BORDER-TOP: #cccccc 1px solid; BORDER-LEFT: #cccccc 1px solid; COLOR: #666666; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #ffffff} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var ids = document.querySelectorAll(".member_id"); | |
var names = document.querySelectorAll(".member_name"); | |
var output = "", length = ids.length; | |
for(var i=0; i<length; i++){ | |
output += ids[i].innerHTML.slice(1,-1) + ":" + names[i].innerHTML + "\n"; | |
} | |
console.log(output); |