Skip to content

Instantly share code, notes, and snippets.

tycoon:
./configure --prefix=/home/work/local/php --with-apxs2=/home/work/local/httpd/bin/apxs --with-mysql=mysqlnd --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd --with-libxml-dir --with-zlib --enable-bcmath --with-openssl-dir --enable-ftp --enable-sockets --enable-wddx --enable-maintainer-zts --with-iconv --enable-mbstring --enable-dom --enable-shmop --with-openssl-dir=/home/work/.jumbo/ --with-curl --with-gd --with-jpeg-dir=/home/work/local/jpeg --with-png-dir --enable-intl --enable-soap --enable-sqlite-utf8 --with-pear --with-freetype-dir=/home/work/local/freetype --with-icu-dir=/home/work/local/icu
./configure --prefix=/home/work/local/php --with-mysql=mysqlnd --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd --with-libxml-dir --with-zlib --enable-bcmath --enable-sockets --enable-mbstring --enable-dom --with-curl --enable-soap --with-pear --enable-fpm --enable-pcntl --with-gd --with-jpeg-dir=/home/work/local/jpeg --with-png-dir --enable-debug --enable-maintainer-zts
@guweigang
guweigang / axure_rp_7
Created February 24, 2014 07:35
Axure RP 7
Axure RP 7.0注册码
用户名:axureuser
序列号:8wFfIX7a8hHq6yAy6T8zCz5R0NBKeVxo9IKu+kgKh79FL6IyPD6lK7G6+tqEV4LG
@guweigang
guweigang / dnspod.sh
Created June 2, 2014 17:41
dnspod shell
#!/bin/sh
#written by benson huang
#admin@zhetenger.com
curl_status=`which curl 2>/dev/null`
[ -n "$curl_status" ] || { echo "curl is not installed";exit 3; }
#dnspod帐号名
email='admin@zhetenger.com'
#dnspod密码
password='xxxxxxx'
@guweigang
guweigang / gitlab_trigger.php
Last active August 29, 2015 14:02
gitlab trigger
<?php
$fs = fopen('./cycle_hook.log', 'a');
$client_ip = $_SERVER['REMOTE_ADDR'];
fwrite($fs, 'Request on ['.date("Y-m-d H:i:s").'] from ['.$client_ip.']'.PHP_EOL);
$json = file_get_contents('php://input');
$data = json_decode($json, true);
@guweigang
guweigang / rsa.php
Created June 19, 2014 15:06
PHP RSA
<?php
/* RSA.php ---
*
* Filename: RSA.php
* Description:
* Author: Gu Weigang * Maintainer:
* Created: Mon Apr 28 11:27:20 2014 (+0800)
* Version: master
* Last-Updated: Tue May 6 16:04:24 2014 (+0800)
* By: Gu Weigang
@guweigang
guweigang / comma.php
Created June 30, 2014 12:55
全角转半角
<?php
$str = "0123ABCDFWS\",.?<>{}[]*&^%#@!~()+-|:;";
echo "$str";
echo "<br />";
$str = preg_replace('/\xa3([\xa1-\xfe])/e', 'chr(ord(\1)-0x80)', $str);
echo $str;
<?php
use
Phalcon\Mvc\Model,
Phalcon\Mvc\Model\Message,
Phalcon\Db\RawValue;
/**
* 基础 Model 实现
*
#!/bin/bash
# mysql 自动备份
TIMESTAMP=$(date +"%Y%m%d")
BACKUP_DIR="/usr/local/mysql/backup"
MYSQL_USER="root"
MYSQL=/usr/local/mysql/bin/mysql
MYSQL_PASSWORD="root"
MYSQLDUMP=/usr/local/mysql/bin/mysqldump
package main
import (
"io"
"log"
"net"
"bytes"
"bufio"
"strings"
"time"
<?php
namespace NCFGroup\Common\Library;
/**
* AES对称加密封装 (包括base64)
* 算法: AES128位
* 模式: ECB
* 填充: PKCS5Padding
*/