Skip to content

Instantly share code, notes, and snippets.

View DrayChou's full-sized avatar
😸

Dray DrayChou

😸
View GitHub Profile
#!/bin/bash
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
export PATH
# SET FTP server you want back up to
FTP_HOST=""
FTP_USER=""
FTP_PASS=""
# Databases information
<?php
/* ---------------------------------------------------- */
/* 程序名称: PHP探针-Yahei
/* 程序功能: 探测系统的Web服务器运行环境
/* 程序开发: Yahei.Net
/* 联系方式: info@Yahei.net
/* Date: 1970-01-01 / 2012-07-08
/* ---------------------------------------------------- */
/* 使用条款:
/* 1.该软件免费使用.
$ ./all.bash
# Building C bootstrap tool.
cmd/dist
# Building compilers and Go bootstrap tool for host, linux/386.
lib9
libbio
libmach
misc/pprof
cmd/addr2line
@DrayChou
DrayChou / mysqldump.sh
Created July 6, 2014 18:03
导出数据表为XML
#!/bin/env bash
username=""
passwd=""
host=""
db1=""
#连接数据库把表都拉出来
mysql_tables=`mysql -h $host -u $username -p"$passwd" -e "use $db1; show tables; " | grep -vE "Tables_in_src_master"`
@DrayChou
DrayChou / mysqldump2.php
Created July 19, 2014 14:42
php 导出指定表的脚本
<?php
/**
* Created by PhpStorm.
* User: Dray
* Date: 14-7-19
* Time: 下午4:58
*/
$update_table = array(
'table1',
@DrayChou
DrayChou / wordpress_md.rb
Created February 11, 2012 04:41
wordpress blog -> markdown
# coding: utf-8
require 'rubygems'
require 'hpricot'
require 'fileutils'
require 'time'
require 'ya2yaml'
require 'nokogiri'
require 'cgi'
require 'chinese_pinyin'
@DrayChou
DrayChou / vr_pptpd.sh
Created April 21, 2012 07:58
pptp 一键脚本,适用于 centos 5
yum remove -y pptpd ppp
/etc/init.d/iptables stop
iptables --flush POSTROUTING --table nat
iptables --flush FORWARD
rm -rf /etc/pptpd.conf
rm -rf /etc/ppp
wget http://www.diahosting.com/dload/dkms-2.0.17.5-1.noarch.rpm
#wget http://www.diahosting.com/dload/kernel_ppp_mppe-1.0.2-3dkms.noarch.rpm
wget http://www.diahosting.com/dload/pptpd-1.3.4-1.rhel5.1.i386.rpm
<?php
function B($a){
$b = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
if(empty($a)){
return $a;
}
$a = str_split(strval($a));

Twitter公式クライアントのコンシューマキー

Twitter for iPhone

Consumer key: IQKbtAYlXLripLGPWd0HUA
Consumer secret: GgDYlkSvaPxGxC4X8liwpUoqKwwr3lCADbz8A7ADU

Twitter for Android

Consumer key: 3nVuSoBZnx6U4vzUxf5w
Consumer secret: Bcs59EFbbsdF6Sl9Ng71smgStWEGwXXKSjYvPVt7qys

Twitter for Google TV

Consumer key: iAtYJ4HpUVfIUoNnif1DA

@DrayChou
DrayChou / surge_main.conf
Created October 26, 2015 05:55 — forked from jason5ng32/surge.conf
Surge Configs
// DON'T FORGET TO IMPORT proxy.conf TOO
[General]
loglevel = notify
skip-proxy = 192.168.0.0/16, 10.0.0.0/8, 172.16.0.0/12,127.0.0.0/24
bypass-tun = 192.168.0.0/16, 10.0.0.0/8, 172.16.0.0/12,127.0.0.0/24
// DNS OVERRIDE, REMOVE # IF YOU NEED
# dns-server = 223.6.6.6,223.5.5.5,114.114.114.114,114.114.115.115