Skip to content

Instantly share code, notes, and snippets.

@jack-douglas
Last active August 7, 2019 12:37
Show Gist options
  • Save jack-douglas/bed68cb8722cbaf79ec860d203380e7c to your computer and use it in GitHub Desktop.
Save jack-douglas/bed68cb8722cbaf79ec860d203380e7c to your computer and use it in GitHub Desktop.
{
"Multi Line Comment": {
"prefix": "mc",
"body": ["/**", "* $1", "* @param {$2} $3", "*/"],
"description": "Create multiline command."
},
"This code sucks": {
"prefix": "code-sucks",
"body": ["// This code sucks, you know it and I know it. ", "// Move on and call me an idiot later."],
"description": "This code sucks"
},
"Console Log": {
"prefix": "log",
"body": ["console.log($0)"],
"description": "Create a console log"
},
"Arrow Function": {
"prefix": "a",
"body": ["(${1:param}) => {", " $0", "}"],
"description": "Create Arrow function"
},
"Import": {
"prefix": "import",
"body": ["import \"$1\" from '$2'"]
},
"Promise": {
"prefix": "promise",
"body": ["return new Promise((resolve, reject) => {", " $1", "})"]
},
"Then": {
"prefix": "then",
"body": [".then(res => {$2})"]
},
"Catch": {
"prefix": "catch",
"body": [".catch(err => {", " console.log(err)", " $2", "})"]
},
"For Loop": {
"prefix": "for-loop",
"body": ["for (let i = ${1:array}.length; i-- > 0;) {", " console.log(i)", " ${1:actions}", "}"],
"description": ""
},
"Notify Alert": {
"prefix": "notify-alert",
"body": ["this.$root.$emit('alert', '$1', '$2');"]
},
"Notify Platform": {
"prefix": "notify-platform",
"body": [
"$1: {",
" key: '$2',",
" name: '$3',",
" url: '$4',",
" hex: '#$5',",
" wideThumb: $6,",
" urlMatch: $7,",
" extract: $8",
"},"
]
},
"Notify Custom Log Section": {
"prefix": "notify-log-section",
"body": ["base.customLog(\"${1:type}\", { name: \"${2:section}\" }, \"${3:message}\");"],
"description": "Notify Custom Log Section"
},
"Notify Log Section Payload": {
"prefix": "notify-log-section-payload",
"body": ["base.customLog(\"${1:type}\", { name: \"${2:section}\" }, \"${3:message}\", ${4:payload});"],
"description": "Notify Log Section Payload"
},
"Notify Log Payload": {
"prefix": "notify-log-payload",
"body": ["base.customLog(\"${1:type}\", null, \"${3:message}\", ${4:payload});"],
"description": "Notify Log Payload"
},
"Notify Log": {
"prefix": "notify-log",
"body": ["base.customLog(\"${1:type}\", null, \"${3:message}\", null);"],
"description": "Notify Log"
},
"Pulse Collection": {
"prefix": "pulse-collection",
"body": [
"export default {",
" model: {},",
" persist: [],",
" groups: [],",
" routes: {},",
" actions: {},",
" filters: {},",
" watch: {}",
"};"
]
},
"Pulse mapData": {
"prefix": "pulse-mapData",
"body": ["...this.mapData({", " $1: \"$2\"", "})"]
},
"Pulse Route": {
"prefix": "pulse-route",
"body": ["$1: request => request.$2('$3'$4)"]
},
"Pulse Action": {
"prefix": "pulse-action",
"body": ["$1({ routes, $2 }$3) {", " $4", "},"]
},
"Pulse Action Async": {
"prefix": "pulse-action-async",
"body": ["async $1({ routes, $2 }, $3) {", " $4", "},"]
},
"Pulse Filter": {
"prefix": "pulse-filter",
"body": ["$1: ({ $2 }) => {", " $3", "},"]
}
}
{
"Vue Base": {
"prefix": "vue",
"body": [
"<template>",
"<div>",
" \"$2\"",
"</div>",
"</template>",
"<script>",
"export default {",
" data: function () {",
" return {}",
" },",
" name: '$1',",
"}",
"</script>",
"<style lang=\"scss\">",
"",
"</style>"
]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment