Skip to content

Instantly share code, notes, and snippets.

View guweigang's full-sized avatar

愚者 guweigang

View GitHub Profile
@guweigang
guweigang / git_toturial
Last active April 10, 2026 08:14
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远程仓库
<?php
/**
* 微信PHP-SDK
* 服务器端必须要有 CURL 支持
* 2015年7月修正版本
* @author 、小陈叔叔 <cjango@163.com>
* https://coding.net/u/cjango/p/wechat_sdk/git
* 7月10日,完善红包功能,
*/
namespace Tools;
<?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
*
namespace PhalconPlus
class Test
{
protected objects;
public function __construct()
{
let this->objects = new \SplObjectStorage();
}
zend_extension=xdebug.so
xdebug.remote_enable = 1
xdebug.remote_autostart=on
@guweigang
guweigang / PostmarkTransport.php
Last active April 21, 2017 05:16
Postmark Transport for flarum software
<?php
namespace Illuminate\Mail\Transport;
use Swift_Events_EventListener;
use GuzzleHttp\ClientInterface;
use Swift_Mime_Message;
use Swift_Transport;
class PostmarkTransport implements Swift_Transport {
@guweigang
guweigang / log.md
Created March 20, 2017 13:47 — forked from m-jowett/log.md
Setup LibreOffice Online (Log/Guide) [WIP]

Setup LibreOffice Online (Log/Guide) [WIP]

About

This guide/log is based off my experience attempting to build and install LibreOffice Online and it's dependencies on my system.

The end goal is to get LibreOffice Online integrated with Karoshi Server.

LibreOffice Online is still in development (17/06/16).

@guweigang
guweigang / ipMatch.php
Last active November 14, 2016 09:05
IP范围匹配
<?php
function ipMatch($network, $ip)
{
$network=trim($network);
$orig_network = $network;
$ip = trim($ip);
if ($ip == $network) {
echo "used network ($network) for ($ip)\n";
return TRUE;
}
#!/bin/bash
# Function to update the fpm configuration to make the service environment variables available
setEnvironmentVariable() {
if [ -z "$2" ]; then
echo "Environment variable '$1' not set."
return
fi
# Check whether variable already exists
if grep -q $1 /etc/php5/fpm/pool.d/www.conf; then
<?php
// 会音乐
$a = [];
$a[0] = ["hui", "kuai"];
$a[1] = ["yin"];
$a[2] = ["le", "yue"];
function arr_product($a, $b)
{
$b = reset($b);