Skip to content

Instantly share code, notes, and snippets.

View guweigang's full-sized avatar

南無假行僧 guweigang

View GitHub Profile
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);
;; cedet
;;(setq integrated-cedet-p (and (>= emacs-major-version 24)
;; (>= emacs-minor-version 4)))
;;(if integrated-cedet-p
;; (progn
;; (load-file "~/.emacs.d/cedet/cedet-devel-load.el")
;; ;; if you want to enable support for gnu global
;; (when (cedet-gnu-global-version-check)
;; (semanticdb-enable-gnu-global-databases 'c-mode)
<?php
class Seq
{
const CACHE_PREFIX = 'id-sequcence:';
const STEP = 500;
private $dbConf = array();
private $cacheConf = array();

The info you need:

  • PHP 5.2 was never supported by Phalcon.
  • Phalcon 1.3.x is compatible with PHP 5.3.9 or higher.
  • Phalcon 2.0.x is compatible with PHP 5.3.21 or higher. However it's recommended run it at least in 5.4.22.
  • Phalcon 2.1.x will be only PHP >= 5.4.22 compatible.
  • Phalcon should work fine with any MySQL >= 4.1.x