Skip to content

Instantly share code, notes, and snippets.

View ewrfedf's full-sized avatar

Gentle-Pen ewrfedf

View GitHub Profile
yarn add husky -D;
yarn husky install;
yarn add @commitlint/cli @commitlint/config-conventional -D;
echo "module.exports = {extends: ['@commitlint/config-conventional']}" > commitlint.config.js;
yarn husky add .husky/commit-msg 'yarn commitlint --edit "$1"';
yarn add lint-staged -D;
echo '{"./src/**/*.{js,jsx,ts,tsx,vue,less,sass,scss,css.json}": ["prettier --write"],}' > .lintstagedrc;
yarn add prettier -D;
echo 'module.exports = { printWidth: 80, tabWidth: 2,seTabs: false, semi: true, singleQuote: false, quoteProps: "as-needed", jsxSingleQuote: false, trailingComma: "es5", bracketSpacing: false, jsxBracketSameLine: false, arrowParens: "always", rangeStart: 0, rangeEnd: Infinity,};'> .prettierrc.js;
yarn husky add .husky/pre-commit 'yarn lint-staged --allow-empty "$1" && yarn lint';
@ewrfedf
ewrfedf / gist:19998db391e6029a0c194ab58815e64e
Created October 24, 2018 06:54
vsftp安装、配置并支持虚拟用户(命令精简版)
# yum -y install vsftpd*
# yum -y install pam*
# yum -y install db4*
# useradd vsftpd -s /sbin/nologin
# useradd virtusers -s /sbin/nologin
# cp /etc/vsftpd/vsftpd.conf /etc/vsftpd/vsftpd.conf.bak
# vi /etc/vsftpd/vsftpd.conf
@ewrfedf
ewrfedf / gist:abe0e66beb7a5fa50f9a2ab31ba963e3
Created March 13, 2017 10:02 — forked from sam/gist:2778268
Install OpenJDK7 on OSX
if ! [ -d /Library/Java/JavaVirtualMachines/1.7.0u6.jdk ]; then
echo "Downloading OpenJDK 7"
curl -o /tmp/OpenJDK-7.dmg http://openjdk-osx-build.googlecode.com/files/OpenJDK-OSX-1.7-universal-u-jdk-jdk7u6-b10-20120522.dmg
echo "Attaching DMG image"
hdiutil attach /tmp/OpenJDK-7.dmg
echo "Copying JDK into available Java Virtual Machines"
sudo cp -R /Volumes/OpenJDK\ 7\ \(Mac\ OS:X\ Port\)/1.7.0u.jdk /Library/Java/JavaVirtualMachines/1.7.0u6.jdk
echo "Detach DMG image"
hdiutil detach /Volumes/OpenJDK\ 7\ \(Mac\ OS:X\ Port\)
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE module PUBLIC "-//Puppy Crawl//DTD Check Configuration 1.2//EN" "http://www.puppycrawl.com/dtds/configuration_1_2.dtd">
<!-- Generated by RHY @will_awoke -->
<module name="Checker">
<property name="charset" value="UTF-8"/>
<property name="severity" value="warning"/>
<?xml version="1.0"?>
<!DOCTYPE module PUBLIC
"-//Puppy Crawl//DTD Check Configuration 1.3//EN"
"http://www.puppycrawl.com/dtds/configuration_1_3.dtd">
<!--
Checkstyle configuration that checks the Google coding conventions from Google Java Style
that can be found at https://google.github.io/styleguide/javaguide.html.
Checkstyle is very configurable. Be sure to read the documentation at
http://checkstyle.sf.net (or in your downloaded distribution).