Skip to content

Instantly share code, notes, and snippets.

View DrayChou's full-sized avatar
😸

Dray DrayChou

😸
View GitHub Profile
@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
<?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 / 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, ...)
@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 / 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 / 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:
<?php
/**
* crontab 时间格式php解析类(PHP 5 >= 5.1.0)
*
* @author 肖武 <tsxw24@gmail.com>
* @link https://code.google.com/p/xwcrontab/
*/
class XwCrontab {
@DrayChou
DrayChou / p.php
Created December 25, 2013 03:54
lnmp 中带的 php 探针
<?php
/* ----------------本探针基于YaHei.net探针------------------- */
error_reporting(0); //抑制所有错误信息
@header("content-Type: text/html; charset=utf-8"); //语言强制
ob_start();
$title = "雅黑PHP探针";
$version = "v0.4.2"; //版本号
define('HTTP_HOST', preg_replace('~^www\.~i', '', $_SERVER['HTTP_HOST']));
@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();