This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| call NERDTreeAddKeyMap({'key': 't', 'callback': 'NERDTreeMyOpenInTab', 'scope': 'FileNode', 'override': 1 }) | |
| function NERDTreeMyOpenInTab(node) | |
| call a:node.open({'reuse': "all", 'where': 't'}) | |
| endfunction |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #coding=utf8 | |
| import itchat | |
| # tuling plugin can be get here: | |
| # https://github.com/littlecodersh/EasierLife/tree/master/Plugins/Tuling | |
| from tuling import get_response | |
| @itchat.msg_register('Text') | |
| def text_reply(msg): | |
| if u'作者' in msg['Text'] or u'主人' in msg['Text']: | |
| return u'你可以在这里了解他:https://github.com/littlecodersh' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Uses a PID file to add daemon-like behavior to an arbitrary program. | |
| ################################################################################ | |
| usage() { | |
| echo "Usage: `basename $0` PROGRAM {start|stop|restart|force-stop|force-restart|status} [PIDFILE|PID]" >&2 | |
| echo "Where: PROGRAM is an executable file." >&2 | |
| echo " PIDFILE is the file that contains (or will contain) the PID." >&2 | |
| echo " PID is a process id to use in place of a PIDFILE." >&2 | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Step by step installation guide for nginx + PHP 7.1 on CentOS 7 | |
| 1. Add and enable Remi repos | |
| yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm | |
| yum install http://rpms.remirepo.net/enterprise/remi-release-7.rpm | |
| yum install yum-utils | |
| yum-config-manager --enable remi-php71 | |
| 2. Install php 7.1 and required modules | |
| yum install php71-php-fpm |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ## | |
| # @server studio | |
| # @host hackisition.com | |
| # @desc nginx host rules | |
| # @author Julien Le Coupanec <[email protected]> | |
| ## | |
| # HTTP Server | |
| server { | |
| listen 80; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Container(dict): | |
| def __init__(self, *args, **kwargs): | |
| super(Container, self).__init__(*args, **kwargs) | |
| self._shared = set() | |
| self._instances = {} | |
| def __getitem__(self, key): | |
| if key in self._instances: | |
| return self._instances[key] | |