Skip to content

Instantly share code, notes, and snippets.

View bloatfan's full-sized avatar
🤒
Out sick

bloatfan bloatfan

🤒
Out sick
View GitHub Profile
@bloatfan
bloatfan / Flexbox Article Layout.markdown
Created June 17, 2016 16:46
Flexbox Article Layout

Flexbox Article Layout

Flexbox is an amazingly powerful layout tool. In this example I have created a responsive grid of articles that increased the amount of visible articles on the page at larger resolutions.

A Pen by 张小张 on CodePen.

License.

@bloatfan
bloatfan / iteratorDir.js
Created November 22, 2016 13:31
nodejs 遍历目录 返回目录项数组
function iteratorDir(dir, recursive) {
// 去除尾部的'/'字符
if (dir[dir.length - 1] == '/') {
dir = dir.substring(0, dir.length - 1);
}
var dirList = [];
var items = fs.readdirSync(dir);
items.forEach((item, index) => {
var path = dir + '/' + item;
@bloatfan
bloatfan / phpcs.xml.dist
Last active February 20, 2017 08:34
phpcs.xml.dist
<?xml version="1.0" encoding="UTF-8"?>
<ruleset name="PHP_CodeSniffer">
<description>The coding standard for PHP_CodeSniffer itself.</description>
<exclude-pattern>*/vendor/*</exclude-pattern>
<rule ref="PSR2"/>
</ruleset>
@bloatfan
bloatfan / phpunit.xml.dist
Created February 20, 2017 08:35
phpunit.xml.dist
<?xml version="1.0" encoding="UTF-8"?>
<phpunit backupGlobals="false"
backupStaticAttributes="false"
bootstrap="tests/bootstrap.php"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
@bloatfan
bloatfan / jsconfig.json
Created February 20, 2017 08:51
jsconfig.json
{
// See https://go.microsoft.com/fwlink/?LinkId=759670
// for the documentation about the jsconfig.json format
"compilerOptions": {
"target": "es6",
"module": "commonjs",
"allowSyntheticDefaultImports": true
},
"exclude": [
"node_modules",
@bloatfan
bloatfan / .eslintrc.js
Created February 20, 2017 08:52
.eslintrc.js
module.exports = {
// https://github.com/feross/standard/blob/master/RULES.md#javascript-standard-style
'extends': 'standard',
'env': {
'browser': true,
'commonjs': true,
'es6': true,
'node': true
},
'globals': {
zend_extension=xdebug.so
xdebug.collect_return=1
xdebug.default_enable=1
xdebug.remote_enable=1
xdebug.remote_connect_back=0
xdebug.remote_host=192.168.10.1
xdebug.remote_port=7777
xdebug.max_nesting_level=512
xdebug.idekey=vagrant
xdebug.remote_autostart=1
<?xml version="1.0" encoding="UTF-8"?>
<ruleset name="PHP_CodeSniffer">
<description>The coding standard for PHP_CodeSniffer itself.</description>
<exclude-pattern>*/vendor/*</exclude-pattern>
<!-- 2. General -->
<!-- 2.1 Basic Coding Standard -->
<!-- Include the whole PSR-1 standard -->