Skip to content

Instantly share code, notes, and snippets.

View DrayChou's full-sized avatar
😸

Dray DrayChou

😸
View GitHub Profile
<?php
/**
* crontab 时间格式php解析类(PHP 5 >= 5.1.0)
*
* @author 肖武 <tsxw24@gmail.com>
* @link https://code.google.com/p/xwcrontab/
*/
class XwCrontab {
@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:
@DrayChou
DrayChou / gist:8033658
Created December 19, 2013 02:57
创建新的 beego 项目脚本
@echo 设置APP的值为您的应用文件夹名称
set APP=BeeGoTo
set GOPATH=%~dp0..
set BEE=%GOPATH%\bin\bee
%BEE% new %APP%
cd %APP%
echo %BEE% run %APP%.exe > run.bat
echo pause >> run.bat
start run.bat
pause
@DrayChou
DrayChou / run 的错误信息
Created October 22, 2013 08:54
修改的代码文件为 config.go main.go, 新添加文件 ssh2.go 新增的配置格式为: # plink 代理参数 sshServer2 = user@server:password:local_socks_port[:server_ssh_port]
d:/golang/go-win-386/bin/go.exe build [D:/golang/code/cow]
成功: 进程退出代码 0.
D:/golang/code/cow/cow.exe [D:/golang/code/cow]
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xc0000005 code=0x1 addr=0x0 pc=0x4d5118]
goroutine 1 [running]:
runtime.panic(0x5860a0, 0x7b984f)
C:/Users/ADMINI~1/AppData/Local/Temp/2/bindist284472239/go/src/pkg/runtime/panic.c:266 +0xa6
log.(*Logger).Output(0x0, 0x2, 0x125029c0, 0x25, 0x0, ...)
<?xml version="1.0" encoding="UTF-8"?>
<opml version="1.0">
<head>
<title>Google 阅读器中 Dray 的订阅</title>
</head>
<body>
<outline title="Linux" text="Linux">
<outline text="Linux公社 - Linux系统门户网站"
title="Linux公社 - Linux系统门户网站" type="rss"
xmlUrl="http://www.linuxidc.com/rssFeed.aspx" htmlUrl="http://www.linuxidc.com/"/>
@DrayChou
DrayChou / kaomoji.dict.yaml
Last active December 18, 2015 21:38 — forked from zolunx10/.gitignore
添加以前收集的大量颜文字到字典
# Rime dictionary - kaomoji
# encoding: utf-8
# ref: http://www.facemark.jp/
---
name: kaomoji
version: "0.3"
sort: origin
...
( ̄ε(# ̄) va 10
@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

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

<?php
function B($a){
$b = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
if(empty($a)){
return $a;
}
$a = str_split(strval($a));