Skip to content

Instantly share code, notes, and snippets.

@chungchi300
Last active September 14, 2017 03:57
Show Gist options
  • Select an option

  • Save chungchi300/7fb914f0881e5b297fe65a499d4552dd to your computer and use it in GitHub Desktop.

Select an option

Save chungchi300/7fb914f0881e5b297fe65a499d4552dd to your computer and use it in GitHub Desktop.
# initialization file (not found)
'atom-workspace':
'ctrl-q': 'last-cursor-position:previous'
'atom-text-editor':
'ctrl-shift-v': 'atom-beautify:beautify-editor'
'atom-text-editor:not(.mini)':
'ctrl-shift-r': 'refactor:rename'
'atom-workspace, atom-workspace atom-text-editor':
'alt-m': 'markdown-preview:toggle'
##shift (project based),alt global view based,##ctrl file base
#'body':
# 'ctrl-alt-r': 'unset!'
#'atom-text-editor:not(.mini)':
# 'ctrl-alt-r': 'unset!'
# 'ctrl-alt-e': 'refactor:rename'
'.platform-linux, .platform-linux .command-palette atom-text-editor':
'alt-p': 'command-palette:toggle'
'.platform-darwin, .platform-linux, .platform-win32':
'alt-shift-D': 'diagnostics:toggle-table'
'.platform-win32 atom-workspace, .platform-linux atom-workspace':
'ctrl-t': 'unset!'
'.platform-win32 atom-text-editor, .platform-linux atom-text-editor':
'f6': 'find-and-replace:replace-all'
'body':
'ctrl-1': 'pane:show-item-1'
'ctrl-2': 'pane:show-item-2'
'ctrl-3': 'pane:show-item-3'
'ctrl-4': 'pane:show-item-4'
'ctrl-5': 'pane:show-item-5'
'ctrl-6': 'pane:show-item-6'
'ctrl-7': 'pane:show-item-7'
'ctrl-8': 'pane:show-item-8'
'ctrl-9': 'pane:show-item-9'
[
{
"name": "MagicPython",
"version": "1.0.12"
},
{
"name": "about",
"version": "1.7.6"
},
{
"name": "activate-power-mode",
"version": "2.4.0"
},
{
"name": "archive-view",
"version": "0.63.3"
},
{
"name": "atom-dark-syntax",
"version": "0.28.0",
"theme": "syntax"
},
{
"name": "atom-dark-ui",
"version": "0.53.0",
"theme": "ui"
},
{
"name": "atom-light-syntax",
"version": "0.29.0",
"theme": "syntax"
},
{
"name": "atom-light-ui",
"version": "0.46.0",
"theme": "ui"
},
{
"name": "atom-material-syntax",
"version": "1.0.6",
"theme": "syntax"
},
{
"name": "atom-material-ui",
"version": "2.0.4",
"theme": "ui"
},
{
"name": "atom-ternjs",
"version": "0.18.3"
},
{
"name": "autocomplete-atom-api",
"version": "0.10.1"
},
{
"name": "autocomplete-css",
"version": "0.16.2"
},
{
"name": "autocomplete-html",
"version": "0.8.0"
},
{
"name": "autocomplete-paths",
"version": "2.11.0"
},
{
"name": "autocomplete-plus",
"version": "2.35.5"
},
{
"name": "autocomplete-snippets",
"version": "1.11.0"
},
{
"name": "autoflow",
"version": "0.29.0"
},
{
"name": "autosave",
"version": "0.24.3"
},
{
"name": "background-tips",
"version": "0.27.1"
},
{
"name": "base16-tomorrow-dark-theme",
"version": "1.5.0",
"theme": "syntax"
},
{
"name": "base16-tomorrow-light-theme",
"version": "1.5.0",
"theme": "syntax"
},
{
"name": "bookmarks",
"version": "0.44.4"
},
{
"name": "bracket-matcher",
"version": "0.87.3"
},
{
"name": "clipboard-plus",
"version": "0.5.1"
},
{
"name": "command-palette",
"version": "0.40.4"
},
{
"name": "dalek",
"version": "0.2.1"
},
{
"name": "deprecation-cop",
"version": "0.56.7"
},
{
"name": "dev-live-reload",
"version": "0.47.1"
},
{
"name": "encoding-selector",
"version": "0.23.4"
},
{
"name": "exception-reporting",
"version": "0.41.4"
},
{
"name": "file-icons",
"version": "2.1.11"
},
{
"name": "find-and-replace",
"version": "0.208.3"
},
{
"name": "fuzzy-finder",
"version": "1.5.8"
},
{
"name": "git-diff",
"version": "1.3.6"
},
{
"name": "github",
"version": "0.3.4-1"
},
{
"name": "go-to-line",
"version": "0.32.1"
},
{
"name": "grammar-selector",
"version": "0.49.5"
},
{
"name": "haskell-grammar",
"version": "0.4.0"
},
{
"name": "highlight-selected",
"version": "0.13.1"
},
{
"name": "image-view",
"version": "0.61.2"
},
{
"name": "incompatible-packages",
"version": "0.27.3"
},
{
"name": "keybinding-resolver",
"version": "0.38.0"
},
{
"name": "language-babel",
"version": "2.74.1"
},
{
"name": "language-c",
"version": "0.58.1"
},
{
"name": "language-clojure",
"version": "0.22.3"
},
{
"name": "language-coffee-script",
"version": "0.48.7"
},
{
"name": "language-csharp",
"version": "0.14.2"
},
{
"name": "language-css",
"version": "0.42.4"
},
{
"name": "language-docker",
"version": "1.1.8"
},
{
"name": "language-gfm",
"version": "0.89.1"
},
{
"name": "language-git",
"version": "0.19.1"
},
{
"name": "language-go",
"version": "0.44.1"
},
{
"name": "language-graphql",
"version": "0.9.0"
},
{
"name": "language-html",
"version": "0.47.3"
},
{
"name": "language-hyperlink",
"version": "0.16.1"
},
{
"name": "language-ini",
"version": "1.19.0"
},
{
"name": "language-java",
"version": "0.27.2"
},
{
"name": "language-javascript",
"version": "0.126.1"
},
{
"name": "language-json",
"version": "0.19.1"
},
{
"name": "language-less",
"version": "0.32.0"
},
{
"name": "language-lua",
"version": "0.9.11"
},
{
"name": "language-make",
"version": "0.22.3"
},
{
"name": "language-markdown",
"version": "0.25.1"
},
{
"name": "language-mustache",
"version": "0.14.1"
},
{
"name": "language-objective-c",
"version": "0.15.1"
},
{
"name": "language-ocaml",
"version": "1.9.5"
},
{
"name": "language-perl",
"version": "0.37.0"
},
{
"name": "language-php",
"version": "0.39.0"
},
{
"name": "language-property-list",
"version": "0.9.1"
},
{
"name": "language-python",
"version": "0.45.3"
},
{
"name": "language-ruby",
"version": "0.71.1"
},
{
"name": "language-ruby-on-rails",
"version": "0.25.2"
},
{
"name": "language-rust",
"version": "0.4.12"
},
{
"name": "language-sass",
"version": "0.59.0"
},
{
"name": "language-shellscript",
"version": "0.25.1"
},
{
"name": "language-source",
"version": "0.9.0"
},
{
"name": "language-sql",
"version": "0.25.6"
},
{
"name": "language-swift",
"version": "0.5.0"
},
{
"name": "language-text",
"version": "0.7.3"
},
{
"name": "language-thrift",
"version": "1.0.2"
},
{
"name": "language-todo",
"version": "0.29.1"
},
{
"name": "language-toml",
"version": "0.18.1"
},
{
"name": "language-xml",
"version": "0.35.1"
},
{
"name": "language-yaml",
"version": "0.30.0"
},
{
"name": "last-cursor-position",
"version": "0.9.2"
},
{
"name": "line-ending-selector",
"version": "0.7.3"
},
{
"name": "link",
"version": "0.31.3"
},
{
"name": "linter",
"version": "2.2.0"
},
{
"name": "markdown-preview",
"version": "0.159.12"
},
{
"name": "markdown-preview-plus",
"version": "2.4.10"
},
{
"name": "markdown-scroll-sync",
"version": "2.1.2"
},
{
"name": "markdown-table-formatter",
"version": "2.9.0"
},
{
"name": "markdown-writer",
"version": "2.7.2"
},
{
"name": "merge-conflicts",
"version": "1.4.5"
},
{
"name": "metrics",
"version": "1.2.6"
},
{
"name": "notifications",
"version": "0.67.2"
},
{
"name": "nuclide",
"version": "0.245.0"
},
{
"name": "nuclide-format-js",
"version": "0.0.41"
},
{
"name": "one-dark-syntax",
"version": "1.7.1",
"theme": "syntax"
},
{
"name": "one-dark-ui",
"version": "1.10.5",
"theme": "ui"
},
{
"name": "one-light-syntax",
"version": "1.7.1",
"theme": "syntax"
},
{
"name": "one-light-ui",
"version": "1.10.5",
"theme": "ui"
},
{
"name": "open-on-github",
"version": "1.2.1"
},
{
"name": "package-generator",
"version": "1.1.1"
},
{
"name": "phpunit",
"version": "1.2.0"
},
{
"name": "pigments",
"version": "0.40.2"
},
{
"name": "prettier-atom",
"version": "0.38.0"
},
{
"name": "react-snippets",
"version": "0.9.0"
},
{
"name": "redux-snippets",
"version": "0.2.2"
},
{
"name": "set-syntax",
"version": "0.3.2"
},
{
"name": "settings-view",
"version": "0.250.0"
},
{
"name": "snippets",
"version": "1.1.4"
},
{
"name": "solarized-dark-syntax",
"version": "1.1.2",
"theme": "syntax"
},
{
"name": "solarized-light-syntax",
"version": "1.1.2",
"theme": "syntax"
},
{
"name": "sort-lines",
"version": "0.15.0"
},
{
"name": "spell-check",
"version": "0.71.4"
},
{
"name": "split-diff",
"version": "1.5.1"
},
{
"name": "status-bar",
"version": "1.8.11"
},
{
"name": "styleguide",
"version": "0.49.6"
},
{
"name": "symbols-view",
"version": "0.116.1"
},
{
"name": "sync-settings",
"version": "0.8.3"
},
{
"name": "tabs",
"version": "0.106.2"
},
{
"name": "timecop",
"version": "0.36.0"
},
{
"name": "tool-bar",
"version": "1.1.0"
},
{
"name": "tool-bar-markdown-writer",
"version": "0.3.0"
},
{
"name": "tree-view",
"version": "0.217.2"
},
{
"name": "update-package-dependencies",
"version": "0.12.0"
},
{
"name": "welcome",
"version": "0.36.4"
},
{
"name": "whitespace",
"version": "0.37.2"
},
{
"name": "wordcount",
"version": "2.10.4"
},
{
"name": "wrap-guide",
"version": "0.40.2"
}
]
{
"activate-power-mode": {
"autoToggle": false
},
"atom-beautify": {
"css": {
"beautify_on_save": true
},
"general": {
"_analyticsUserId": "57b0b172-601d-4b90-938e-503762e7dd45",
"beautifyEntireFileOnSave": false
},
"js": {
"default_beautifier": "Pretty Diff",
"disabled": true
},
"jsx": {
"end_with_comma": true
},
"markdown": {
"commonmark": true,
"default_beautifier": "Remark"
},
"sass": {
"disabled": true
},
"scss": {
"align_assignments": true,
"beautify_on_save": true,
"default_beautifier": "CSScomb",
"disabled": true
}
},
"atom-ternjs": {
"inlineFnCompletionDocumentation": true,
"useSnippets": true
},
"autocomplete-plus": {
"autoActivationDelay": 0,
"backspaceTriggersAutocomplete": true,
"minimumWordLength": 1
},
"clipboard-plus": {
"maximumTextLength": 5000,
"minimumTextLength": 1
},
"core": {
"allowPendingPaneItems": false,
"customFileTypes": {
"source.ini": [
".buckconfig",
".hgrc",
".flowconfig"
],
"source.json": [
".arcconfig",
"BUCK.autodeps"
],
"source.python": [
"BUCK"
]
},
"disabledPackages": [
"intellij-idea-keymap",
"quick-editor",
"linter",
"activate-power-mode",
"language-markdown",
"nuclide-format-js",
"atom-ternjs",
"clipboard-plus",
"tree-view"
],
"ignoredNames": [
".git",
".hg",
".svn",
".DS_Store",
"._*",
"Thumbs.db",
"node_modules",
"dist"
],
"openEmptyEditorOnStart": false,
"packagesWithKeymapsDisabled": [],
"telemetryConsent": "no",
"themes": [
"one-dark-ui",
"atom-material-syntax"
]
},
"editor": {
"fontFamily": "Source Code Pro Medium"
},
"exception-reporting": {
"userId": "e7d10540-0147-f7f4-4331-8945ec22e85f"
},
"fuzzy-finder": {
"preserveLastSearch": true,
"searchAllPanes": true,
"useAlternateScoring": false
},
"linter": {
"errorPanelHeight": 74
},
"markdown-preview-plus": {
"useGitHubStyle": true
},
"markdown-writer": {
"siteEngine": "jekyll",
"siteImagesDir": "blog_accessary/blog_images/moved_from_atom",
"siteUrl": "http://jeff-chung.com"
},
"nuclide": {
"atom-ide-code-format": {
"formatOnType": false
},
"installRecommendedPackages": true,
"nuclide-code-format": {
"formatOnSave": true
},
"nuclide-diagnostics-ui": {
"showDiagnosticTraces": true
},
"nuclide-distraction-free-mode": {},
"nuclide-file-tree": {
"allowKeyboardPrefixNavigation": false,
"revealFileOnSwitch": true,
"showOpenFiles": false,
"showUncommittedChanges": false
},
"nuclide-flow": {
"canUseFlowBin": true,
"enableStructuredTypeHints": true,
"stopFlowOnExit": false,
"warnOnNotInstalled": false
},
"nuclide-home": {
"showHome": false
},
"nuclide-outline-view": {},
"nuclide-quick-open": {},
"nuclide-working-sets": {
"workingSets": [
{
"name": "personal",
"active": false,
"uris": [
"/home/jeffchung/work/source/android/new_react_starter_kit",
"/home/jeffchung/work/source/android/react_native_starter",
"/home/jeffchung/work/source/android/winetrade_react_native",
"/home/jeffchung/work/source/chungchi300.github.io",
"/home/jeffchung/work/source/internal-procedures",
"/home/jeffchung/work/source/web/docker",
"/home/jeffchung/work/source/web/js/chungchi300.github.io",
"/home/jeffchung/work/source/web/js/js_learn",
"/home/jeffchung/work/source/web/js/react_native_best_starter",
"/home/jeffchung/work/source/web/okibook",
"/home/jeffchung/work/source/web/php/mandy_car/.env",
"/home/jeffchung/work/source/web/php/mandy_car/.git",
"/home/jeffchung/work/source/web/php/mandy_car/.gitattributes",
"/home/jeffchung/work/source/web/php/mandy_car/.gitignore-copy",
"/home/jeffchung/work/source/web/php/mandy_car/.gitignore",
"/home/jeffchung/work/source/web/php/mandy_car/.idea",
"/home/jeffchung/work/source/web/php/mandy_car/app",
"/home/jeffchung/work/source/web/php/mandy_car/artisan",
"/home/jeffchung/work/source/web/php/mandy_car/bootstrap",
"/home/jeffchung/work/source/web/php/mandy_car/composer.json",
"/home/jeffchung/work/source/web/php/mandy_car/composer.lock",
"/home/jeffchung/work/source/web/php/mandy_car/config",
"/home/jeffchung/work/source/web/php/mandy_car/database.mysql",
"/home/jeffchung/work/source/web/php/mandy_car/database",
"/home/jeffchung/work/source/web/php/mandy_car/gulpfile.js",
"/home/jeffchung/work/source/web/php/mandy_car/node_modules",
"/home/jeffchung/work/source/web/php/mandy_car/package.json",
"/home/jeffchung/work/source/web/php/mandy_car/phpunit.xml",
"/home/jeffchung/work/source/web/php/mandy_car/previous",
"/home/jeffchung/work/source/web/php/mandy_car/public",
"/home/jeffchung/work/source/web/php/mandy_car/readme.md",
"/home/jeffchung/work/source/web/php/mandy_car/resources",
"/home/jeffchung/work/source/web/php/mandy_car/routes",
"/home/jeffchung/work/source/web/php/mandy_car/server.php",
"/home/jeffchung/work/source/web/php/mandy_car/storage",
"/home/jeffchung/work/source/web/php/mandy_car/tests",
"/home/jeffchung/work/source/web/php/mandy_car/yarn.lock",
"/home/jeffchung/work/source/web/php/mandy_car/zero_conflict_git_refresh.sh",
"/home/jeffchung/work/source/web/php/winetrade_web",
"/home/jeffchung/work/source/web/redux",
"/home/jeffchung/work/source/web/simplest-redux-example",
"/home/jeffchung/work/source/web/winetrade_mobile_react",
"/home/jeffchung/work/source/web/winetrade_web",
"/home/jeffchung/work/source/wiki"
]
},
{
"name": "dpms",
"active": false,
"uris": [
"/home/jeffchung/work/source/web/js/dpms/api-doc",
"/home/jeffchung/work/source/web/js/dpms/cav",
"/home/jeffchung/work/source/web/js/dpms/cav2",
"/home/jeffchung/work/source/web/js/dpms/rdv",
"/home/jeffchung/work/source/web/js/dpms/rdv2"
]
},
{
"name": "advboom",
"active": true,
"uris": [
"/home/jeffchung/work/source/web/js/advboom/api-doc",
"/home/jeffchung/work/source/web/js/advboom/api-server",
"/home/jeffchung/work/source/web/js/advboom/designer-component",
"/home/jeffchung/work/source/web/js/advboom/docker-mariadb-base",
"/home/jeffchung/work/source/web/js/advboom/docker-mariadb",
"/home/jeffchung/work/source/web/js/advboom/web-advertiser-portal",
"/home/jeffchung/work/source/web/js/advboom/web-asset",
"/home/jeffchung/work/source/web/js/advboom/web-designer-portal"
]
},
{
"name": "frontend",
"active": false,
"uris": [
"/home/jeffchung/work/source/web/js/common-react-widget",
"/home/jeffchung/work/source/web/js/js_learn"
]
}
]
},
"use": {}
},
"prettier-atom": {
"formatOnSaveOptions": {
"enabled": true
},
"prettierOptions": {
"bracketSpacing": false,
"parser": "flow",
"trailingComma": "all"
},
"useEslint": true
},
"project-plus": {
"showPath": true
},
"sync-settings": {},
"tool-bar": {
"fullWidth": false,
"iconSize": "16px",
"visible": false
},
"tool-bar-markdown-writer": {
"visibility": "showToolbarOnMarkdown"
},
"welcome": {
"showOnStartup": false
}
}
'.source.js':
'redux-form-template':
'prefix': 'redux-form'
'body': """
import {SubmissionError} from 'redux-form';
import React,{PropTypes} from 'react';
import {Row,Col,Grid,Button} from 'react-bootstrap';
import _ from 'lodash-extend';
import {Provider, connect,} from 'react-redux';
import renderInput from '../../../common/components/form';
import { reduxForm, Field } from 'redux-form' // imported Field
import * as Rule from '../validation-rule';
import FormError from '../../../common/components/form-error';
const validate = values => {
const errors = {}
return errors
}
const asyncValidate = (values/*, dispatch */) => {
//return a promise object,and can throw exception
return new Promise(resolve=>resolve());
}
class ${1:formName} extends React.Component {
render() {
const { error,handleSubmit, pristine, reset, submitting } = this.props;
return (
<form onSubmit={handleSubmit}>
<FormError error={error} />
<button type="submit" className="second medium" disabled={pristine || submitting}>Submit</button>
</form>
);
}
}
export default reduxForm({
form: 'unique-${1:formName}-id', validate,asyncValidate, asyncBlurFields: [ ]
// no fields array given
})(${1:formName})
"""
'react-template':
'prefix': 'react-template'
'body': """
import React from 'react';
import _ from 'lodash';
export default class ${1:ComponentName} extends React.Component {
render() {
return (
${2:JSXTree}
);
}
}
"""
'smart-react-template':
'prefix': 'smart-react-template'
'body': """
import React,{PropTypes} from 'react';
import _ from 'lodash-extend';
import * as CommonReactWidget from 'common-react-widget';
import {
Panel,
Grid,
Col,
Row,
} from 'react-bootstrap';
import { Provider, connect } from 'react-redux';
import {Link} from 'react-router';
class ${1:ComponentName} extends React.Component {
render() {
return (
${2:JSXTree}
);
}
}
function mapStateToProps(state,ownProps) {
//
return {
}
}
// Map Redux actions to component props,a way that allow presentation component to get dispatch action function from parent
function mapDispatchToProps(dispatch,ownProps) {
//
return {
}
}
${1:ComponentName}.propTypes = {
}
export default connect(mapStateToProps, mapDispatchToProps)( ${1:ComponentName} );
"""
'redux-form-sync-submit':
'prefix': 'redux-form-sync-submit'
'body': """
function onSubmit(values,dispatch) {
return dispatch({type: '${1:ACTION_TYPE}',values:values});
}
"""
'redux-form-async-submit':
'prefix': 'redux-form-async-submit'
'body': """
function onSubmit(values, dispatch) {
return ${1:Promise}. // simulate server latency
then(() => {
if (${2:checkVals}) {
throw new SubmissionError({ _error: '${3:errorMsg}'})
} else {
dispatch({type: '${4:dispatchAction}'});
}
});
}
"""
'expect-to-be':
'prefix': 'eb'
'body': """
expect(${1:testValue}).toBe(${2:desire})
"""
'redux-form-field':
'prefix': 'rdxff'
'body': """
<Field validate={[Rule.requiredV]} type="text" component={renderInput} name={'${1:title}'} label="${1:title}" placeholder=""/>
"""
'redux-reducer-test':
'prefix': 'treducer'
'body': """
expect(reducer(${1:state}, {type: ${2:actionType}})).toEqual(${3:nextState});
"""
'.source.gfm':
'common-template':
'prefix': 'post-template'
'body': """
---
layout: post
title: '${1:title}'
category: Writing
keywords: null
---
# Before Reading(Before Reading)
1. What you can learn after reading this article? ${2:whatCanLearn}
2. How much time you will use for reading this article? ${3:minutes} minutes
# ${4:IntroductionTitle}
${4:Summary}
"""
'code-review-template':
'prefix': 'code-review-template'
'body': """
### ${1:problemName}
```
f
```
**Error**
```
```
**Improvement**
"""
'best-selection':
'prefix': 'best-selection'
'body': """
# What is the challenge?
# What is the basic requirement?
# What is the highest requirement?
"""
@font-size: 16px;
html,
body,
.tree-view,
.tooltip,
.tab-bar .tab,
.find-and-replace .find-meta-container,
atom-text-editor[mini],
.btn,
.status-bar,
linter-message {
font-size: @font-size;
}
.nuclide-tabs{
.tab:last-child{
display:none;
}
}
.markdown-preview.markdown-preview {
font-size:16px;
h1{
font-size:22px;
font-weight: bold;
}
h2{
font-size:20px;
font-weight: bold;
}
h3{
font-size:18px;
}
h4{
font-size:17px;
}
}
.theme-one-dark-ui {
atom-text-editor {
// background-color: rgba(0,0,0,1);
}
}
atom-workspace{
//
// background-color:rgba(0,0,0,1);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment