Skip to content

Instantly share code, notes, and snippets.

Vanjor vanjor

Block or report user

Report or block vanjor

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@vanjor
vanjor / hue-pseudo-distributed.ini
Last active Apr 18, 2016
Hue configuration notes
View hue-pseudo-distributed.ini
#####################################
# DEVELOPMENT EDITION
#####################################
# Hue configuration file
# ===================================
#
# For complete documentation about the contents of this file, run
# $ <hue_root>/build/env/bin/hue config_help
#
@vanjor
vanjor / nginx.conf
Last active Aug 29, 2015
Nginx config snippets
View nginx.conf
# snippet 1
# define a new log_format which support logging requestion_time and transter time
log_format combinedio '$remote_addr - $remote_user [$time_local] '
'"$request" $status $body_bytes_sent '
'"$http_referer" "$http_user_agent" $request_length $request_time $upstream_response_time';
# snippet 2
http {
gzip on;
gzip_min_length 1k;
gzip_buffers 4 16k;
@vanjor
vanjor / My_log.php
Last active Aug 29, 2015
Log extension for Codeigniter 3 with 3 updates
View My_log.php
<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
// reference to http://tutorialcodeigniter.com/blog/log-level-fix.html
class MY_Log extends CI_Log {
public function __construct() {
parent::__construct();
//Update 1. updated log levels according to the correct order
$this -> _levels = array('ERROR' => '1', 'INFO' => '2', 'DEBUG' => '3', 'ALL' => '4');
@vanjor
vanjor / php_error_log_collect_hook.php
Last active Aug 29, 2015
Php synchronized log system error after request for Codeigniter 2
View php_error_log_collect_hook.php
<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
/**
* php synchronized log system error after request
* WARNING : only suitable for runing FastCGI model by PHP
* @reference: http://huoding.com/2011/04/12/63
*/
class Php_error_log_collect_hook extends MY_Log {
public static $level = array(
E_ERROR => 'Error',
You can’t perform that action at this time.