Skip to content

Instantly share code, notes, and snippets.

@ShenXuGongZi
ShenXuGongZi / gist:7379281
Created November 8, 2013 23:25
安卓获取远程图片
/**
* 异步下载图片
*/
class ImageDownloaderTask extendsAsyncTask<String, Void, Bitmap> {
private static final int IO_BUFFER_SIZE= 4 * 1024;
private String url;
private finalWeakReference<ImageView> imageViewReference;
public ImageDownloaderTask(ImageViewimageView) {
imageViewReference = newWeakReference<ImageView>(imageView);
}
@ShenXuGongZi
ShenXuGongZi / shadowsocksconfig
Created July 30, 2013 12:40
群共享shadowsocks
服务器资源由 www.host700.com 提供 欢迎选购host700 vps
服务器ip:198.35.44.61
服务器端口:8338
服务密码:host700
加密方式:aes-256-cfb"
客户端下载: http://sourceforge.net/projects/shadowsocksgui/files/dist/ #注意里面有win 跟 mac linux的是什么系统就选什么就好了
/**
* Copyright (c) 2011 Muh Hon Cheng
* Created by honcheng on 28/4/11.
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject
####nginx 反向代理 HOST700.COM
#### 先修改 nginx.conf文件
server
{
listen 80;
server_name 你的域名;
location / {
proxy_pass http://leekfar.yundar.com/;
proxy_redirect off;
@ShenXuGongZi
ShenXuGongZi / gist:5617644
Last active December 17, 2015 13:29
教程shadowsocks+python+Mac
####################################################
###欢迎您选用 WWW.HOST700.com VPS 低价 稳定 实惠 ###
####################################################
#开始先配置shadowsocks这个就大概说下
git clone git://github.com/clowwindy/shadowsocks.git
#然后进入
cd shadowsocks
#然后配置下config.json文件
vim config.json #具体的配置自己看很简单
#运行服务端
<?php
if(!isset($_POST['submit'])){
exit('非法访问!');
}
session_start();
include ("./manyoudb/conn.php");
//开始获取ip
$ip=get_ip();
function get_ip() {
if(getenv('HTTP_CLIENT_IP')) $client_ip = getenv('HTTP_CLIENT_IP');
location / {
auth_basic "Restricted";
auth_basic_user_file conf/htpasswd;
}
#auth_basic_user_file 指令为验证域指定了密码文件
#文件格式如下
user:pass
user2:pass2:comment
user3:pass3
#!/usr/bin/env python
# coding=utf-8
import os
import base64
import re
import time
import datetime
import hashlib
import httplib
{% include 'common/head.html' %}
<body>
{% include 'common/top.html' %}
<div id="Wrapper">
<div id="Main">
<div id="Sidebar">
</div>
<div id="Rightbar">
{% include 'rightbar/user.html' %}
</div>
// API callback
Tabletop.callbacks.tt13518507272638360({"version":"1.0","encoding":"UTF-8","feed":{"xmlns":"http://www.w3.org/2005/Atom","xmlns$openSearch":"http://a9.com/-/spec/opensearchrss/1.0/","xmlns$gs":"http://schemas.google.com/spreadsheets/2006","id":{"$t":"https://spreadsheets.google.com/feeds/worksheets/0AsmHVq28GtVJdG1fX3dsQlZrY18zTVA2ZG8wTXdtNHc/public/basic"},"updated":{"$t":"2012-05-22T22:37:19.508Z"},"category":[{"scheme":"http://schemas.google.com/spreadsheets/2006","term":"http://schemas.google.com/spreadsheets/2006#worksheet"}],"title":{"type":"text","$t":"Github Timeline"},"link":[{"rel":"alternate","type":"text/html","href":"https://spreadsheets.google.com/pub?key\u003d0AsmHVq28GtVJdG1fX3dsQlZrY18zTVA2ZG8wTXdtNHc"},{"rel":"http://schemas.google.com/g/2005#feed","type":"application/atom+xml","href":"https://spreadsheets.google.com/feeds/worksheets/0AsmHVq28GtVJdG1fX3dsQlZrY18zTVA2ZG8wTXdtNHc/public/basic"},{"rel":"self","type":"application/atom+xml","href":"https://spreadsheets.google.com/