Skip to content

Instantly share code, notes, and snippets.

<?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');
@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 #具体的配置自己看很简单
#运行服务端
####nginx 反向代理 HOST700.COM
#### 先修改 nginx.conf文件
server
{
listen 80;
server_name 你的域名;
location / {
proxy_pass http://leekfar.yundar.com/;
proxy_redirect off;
/**
* 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
@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的是什么系统就选什么就好了
@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);
}
<?php include 'header.php'; ?>
<script type="text/javascript" language="javascript">
function ChangeTxt(obj){
var val = obj.options[obj.selectedIndex].value; //获取下接框选择的值
document.getElementById("menu").value=val; //将获取的值填写到文本框
}
</script>
<form action="action.php?kind=<?php echo $_GET["kind"]?>
&come=addziliao" method="post">
<div class="container">
@ShenXuGongZi
ShenXuGongZi / Popobox-debian
Created November 13, 2013 02:54
泡泡云 29元安炸那个debian
Debian with Popobox v1.0
原文链接:http://pear.xiaojiublog.net/2013/11/debian-with-popobox-v1-0/
## 部分内容由 felix021 修正、简化 ##
1: 制作Debian系统
mkdir chroot && cd chroot
sudo debootstrap --foreign --arch=armel wheezy debian http://ftp.debian.org/debian
打包:
@ShenXuGongZi
ShenXuGongZi / gist:10983693
Created April 17, 2014 13:32
VPS有货无货监控脚本
<?php
$url = 'https://my.frantech.ca/cart.php?a=add&pid=1';
$content = file_get_contents($url);
if (preg_match("/Out of Stock/i", $content)) {
echo "我擦,没货!";
} else {
echo "我勒个去,终于有货了!";
sendMail();
@ShenXuGongZi
ShenXuGongZi / gist:11167634
Last active August 29, 2015 14:00
db.php
db.<?php
require './lib/dibi.min.php';
// DB
try {
$dsn = new PDO("mysql:host=localhost;dbname=runtime", 'root', '****', array(
PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES utf8"
));
dibi::connect(array(