Skip to content

Instantly share code, notes, and snippets.

View DrayChou's full-sized avatar
😸

Dray DrayChou

😸
View GitHub Profile
$ ./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',

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
@DrayChou
DrayChou / mysql_small.cnf
Last active March 21, 2016 03:50
mysql 最小配置
# Example MySQL config file for small systems.
#
# This is for a system with little memory (<= 64M) where MySQL is only used
# from time to time and it's important that the mysqld daemon
# doesn't use much resources.
#
# MySQL programs look for option files in a set of
# locations which depend on the deployment platform.
# You can copy this option file to one of those
# locations. For information about these locations, see:
@DrayChou
DrayChou / my.cnf
Created March 19, 2016 03:20 — forked from jyr/my.cnf
my.cnf on MNPP
# Example MySQL config file for small systems.
#
# This is for a system with little memory (<= 64M) where MySQL is only used
# from time to time and it's important that the mysqld daemon
# doesn't use much resources.
#
# MySQL programs look for option files in a set of
# locations which depend on the deployment platform.
# You can copy this option file to one of those
# locations. For information about these locations, see:
<?php
/**
* crontab 时间格式php解析类(PHP 5 >= 5.1.0)
*
* @author 肖武 <tsxw24@gmail.com>
* @link https://code.google.com/p/xwcrontab/
*/
class XwCrontab {
@DrayChou
DrayChou / shadow.sh
Created August 25, 2016 15:23 — forked from bumaociyuan/shadow.sh
极路由安装ss
#!/bin/sh
#
echo ''
echo '/*教程请参考:极路由Shadowsocks家庭无痛翻墙实践*/'
echo 'https://luolei.org/hiwifi-shadowsocks/'
echo 'by @foru17'
echo ''
echo ''
echo '那一天,'
echo '人类终于回想起了,'
<?php
ini_set('memory_limit', '4G');
if (mb_internal_encoding() != "UTF-8") {
mb_internal_encoding("UTF-8");
}
$file = "test2.txt"; // 一个编码为gbk的中文文件
// $encodeings = mb_list_encodings();