Skip to content

Instantly share code, notes, and snippets.

View guweigang's full-sized avatar

南無假行僧 guweigang

View GitHub Profile
@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 / 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 / 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'
<?php
/**
* Gibberish AES, a PHP Implementation
*
* See Gibberish AES javascript encryption library, @link https://github.com/mdp/gibberish-aes
*
* This implementation is based on initial code proposed by nbari at dalmp dot com
* @link http://www.php.net/manual/en/function.openssl-decrypt.php#107210
*
@guweigang
guweigang / git_toturial
Last active June 6, 2024 00:23
git命令大全
git init # 初始化本地git仓库(创建新仓库)
git config --global user.name "xxx" # 配置用户名
git config --global user.email "xxx@xxx.com" # 配置邮件
git config --global color.ui true # git status等命令自动着色
git config --global color.status auto
git config --global color.diff auto
git config --global color.branch auto
git config --global color.interactive auto
git config --global --unset http.proxy # remove proxy configuration on git
git clone git+ssh://git@192.168.53.168/VT.git # clone远程仓库
@guweigang
guweigang / axure_rp_7
Created February 24, 2014 07:35
Axure RP 7
Axure RP 7.0注册码
用户名:axureuser
序列号:8wFfIX7a8hHq6yAy6T8zCz5R0NBKeVxo9IKu+kgKh79FL6IyPD6lK7G6+tqEV4LG
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
{
"supplierShort": "工商银行",
"endDate": null,
"beginDate": null,
"productType": "3000",
"modTime": "2013-12-06 14:11:48",
"earlyBack": "0",
"lowestAmount": "50000.00",
"supplierLogoUrl": "http://www.qianxs.com/mrMoney/images_n2/ICBC.png",
"investCycle": "1",
<?php
$connection = new \Phalcon\Db\Adapter\Pdo\Mysql(array(
"host" => "10.48.31.126",
"port" => "8006",
"username" => "root",
"password" => "root",
"dbname" => "Vs_Finance_Biz",
"options" => array(
\PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8'
<?php
/* DefaultEvent.php ---
*
* Filename: DefaultEvent.php
* Description:
* Author: Gu Weigang * Maintainer:
* Created: Fri Nov 8 16:34:55 2013 (+0800)
* Version: 116900
* Last-Updated: Wed Nov 13 16:46:24 2013 (+0800)
* By: Gu Weigang