Skip to content

Instantly share code, notes, and snippets.

View lesschar's full-sized avatar
🎯
Focusing

lesschar

🎯
Focusing
View GitHub Profile
@lesschar
lesschar / 0_reuse_code.js
Last active August 29, 2015 14:06
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@lesschar
lesschar / _vimrc
Last active August 29, 2015 14:06
" =============================================================================
" << 判断操作系统是 Windows 还是 Linux 和判断是终端还是 Gvim >>
" =============================================================================
" -----------------------------------------------------------------------------
" < 判断操作系统是否是 Windows 还是 Linux >
" -----------------------------------------------------------------------------
let g:iswindows = 0
let g:islinux = 0
if(has("win32") || has("win64") || has("win95") || has("win16"))
// A module that can be mixed in to *any object* in order to provide it with
// custom events. You may bind with `on` or remove with `off` callback
// functions to an event; `trigger`-ing an event fires all callbacks in
// succession.
//
// var object = {};
// _.extend(object, Backbone.Events);
// object.on('expand', function(){ alert('expanded'); });
// object.trigger('expand');

Additional configurations for PhpStorm to develop with Yii framework

Autocomplete Yii::app() components

Open framework/yii.php file, override app() static method as follow:

<?php
class Yii extends YiiBase
{
	/**
 * @static