Skip to content

Instantly share code, notes, and snippets.

@muscaiu
Last active March 18, 2020 09:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save muscaiu/929b046942a9129af90a16326a4d41d8 to your computer and use it in GitHub Desktop.
Save muscaiu/929b046942a9129af90a16326a4d41d8 to your computer and use it in GitHub Desktop.
Visual Studio Code Settings Sync Gist
{"lastUpload":"2020-03-18T09:22:46.576Z","extensionVersion":"v3.4.3"}
[
{
"metadata": {
"id": "e337c67b-55c2-4fef-8949-eb260e7fb7fd",
"publisherId": "Shan.code-settings-sync",
"publisherDisplayName": "Shan"
},
"name": "code-settings-sync",
"publisher": "Shan",
"version": "3.4.3"
},
{
"metadata": {
"id": "1ec62ca5-d7f9-4ddb-a882-e8d018c0aefd",
"publisherId": "msjsdiag.debugger-for-chrome",
"publisherDisplayName": "msjsdiag"
},
"name": "debugger-for-chrome",
"publisher": "msjsdiag",
"version": "4.12.6"
},
{
"metadata": {
"id": "532533c9-a894-4a58-9eee-bbfbe7c06f71",
"publisherId": "mikestead.dotenv",
"publisherDisplayName": "mikestead"
},
"name": "dotenv",
"publisher": "mikestead",
"version": "1.0.1"
},
{
"metadata": {
"id": "f60a60a6-95ba-42d4-b41c-3d24c1b89588",
"publisherId": "EditorConfig.EditorConfig",
"publisherDisplayName": "EditorConfig"
},
"name": "EditorConfig",
"publisher": "EditorConfig",
"version": "0.14.4"
},
{
"metadata": {
"id": "19804510-b475-4dae-b0f7-6ca08fd1af0c",
"publisherId": "dsznajder.es7-react-js-snippets",
"publisherDisplayName": "dsznajder"
},
"name": "es7-react-js-snippets",
"publisher": "dsznajder",
"version": "2.6.0"
},
{
"metadata": {
"id": "5960f38e-0bbe-4644-8f9c-9c8824e82511",
"publisherId": "donjayamanne.githistory",
"publisherDisplayName": "donjayamanne"
},
"name": "githistory",
"publisher": "donjayamanne",
"version": "0.6.0"
},
{
"metadata": {
"id": "4de763bd-505d-4978-9575-2b7696ecf94e",
"publisherId": "eamodio.gitlens",
"publisherDisplayName": "eamodio"
},
"name": "gitlens",
"publisher": "eamodio",
"version": "10.2.1"
},
{
"metadata": {
"id": "a2cec723-5349-460d-9de9-0fd1f8d3456f",
"publisherId": "xabikos.JavaScriptSnippets",
"publisherDisplayName": "xabikos"
},
"name": "JavaScriptSnippets",
"publisher": "xabikos",
"version": "1.7.2"
},
{
"metadata": {
"id": "b63c44fd-0457-4696-99e9-dbfdf70d77de",
"publisherId": "ritwickdey.LiveServer",
"publisherDisplayName": "ritwickdey"
},
"name": "LiveServer",
"publisher": "ritwickdey",
"version": "5.6.1"
},
{
"metadata": {
"id": "5db78037-f674-459f-a236-db622c427c5b",
"publisherId": "PKief.material-icon-theme",
"publisherDisplayName": "PKief"
},
"name": "material-icon-theme",
"publisher": "PKief",
"version": "4.0.1"
},
{
"metadata": {
"id": "26a529c9-2654-4b95-a63f-02f6a52429e6",
"publisherId": "zhuangtongfa.material-theme",
"publisherDisplayName": "zhuangtongfa"
},
"name": "material-theme",
"publisher": "zhuangtongfa",
"version": "3.2.3"
},
{
"metadata": {
"id": "a41c1549-4053-44d4-bf30-60fc809b4a86",
"publisherId": "christian-kohler.path-intellisense",
"publisherDisplayName": "christian-kohler"
},
"name": "path-intellisense",
"publisher": "christian-kohler",
"version": "1.4.2"
},
{
"metadata": {
"id": "c807e072-5951-4a01-9542-450f946c7ec1",
"publisherId": "xabikos.ReactSnippets",
"publisherDisplayName": "xabikos"
},
"name": "ReactSnippets",
"publisher": "xabikos",
"version": "2.4.0"
},
{
"metadata": {
"id": "a84825e8-5f04-4988-b85a-4942e795bcbe",
"publisherId": "burkeholland.simple-react-snippets",
"publisherDisplayName": "burkeholland"
},
"name": "simple-react-snippets",
"publisher": "burkeholland",
"version": "1.2.2"
},
{
"metadata": {
"id": "d6ba4b7b-539f-456a-b0f6-0348df44cdf3",
"publisherId": "nikitaKunevich.snippet-creator",
"publisherDisplayName": "nikitaKunevich"
},
"name": "snippet-creator",
"publisher": "nikitaKunevich",
"version": "0.0.5"
},
{
"metadata": {
"id": "1e0f6104-ad31-4640-9fb7-6d7ac7edb90d",
"publisherId": "jonkwheeler.styled-components-snippets",
"publisherDisplayName": "jonkwheeler"
},
"name": "styled-components-snippets",
"publisher": "jonkwheeler",
"version": "0.6.0"
},
{
"metadata": {
"id": "06e5aaf2-85ae-4d7e-abe1-4d2975a80171",
"publisherId": "gaearon.subliminal",
"publisherDisplayName": "gaearon"
},
"name": "subliminal",
"publisher": "gaearon",
"version": "1.0.0"
},
{
"metadata": {
"id": "38583aca-2ba1-417f-80fc-68ca8d717fb4",
"publisherId": "rbbit.typescript-hero",
"publisherDisplayName": "rbbit"
},
"name": "typescript-hero",
"publisher": "rbbit",
"version": "3.0.0"
},
{
"metadata": {
"id": "583b2b34-2c1e-4634-8c0b-0b82e283ea3a",
"publisherId": "dbaeumer.vscode-eslint",
"publisherDisplayName": "dbaeumer"
},
"name": "vscode-eslint",
"publisher": "dbaeumer",
"version": "2.1.1"
},
{
"metadata": {
"id": "c46b0018-f317-4b6c-a785-d2039b27338f",
"publisherId": "wix.vscode-import-cost",
"publisherDisplayName": "wix"
},
"name": "vscode-import-cost",
"publisher": "wix",
"version": "2.12.0"
},
{
"metadata": {
"id": "79d833b8-b682-40e6-b3e9-86a31a6d7957",
"publisherId": "antmdvs.vscode-react-hooks-snippets",
"publisherDisplayName": "antmdvs"
},
"name": "vscode-react-hooks-snippets",
"publisher": "antmdvs",
"version": "0.1.2"
},
{
"metadata": {
"id": "7b3dd82b-794d-426e-81c1-05642aa27108",
"publisherId": "aaronthomas.vscode-snazzy-operator",
"publisherDisplayName": "aaronthomas"
},
"name": "vscode-snazzy-operator",
"publisher": "aaronthomas",
"version": "1.1.3"
},
{
"metadata": {
"id": "6afc37b9-362f-4bd8-9a0d-9d24eade270d",
"publisherId": "chenxsan.vscode-standardjs",
"publisherDisplayName": "chenxsan"
},
"name": "vscode-standardjs",
"publisher": "chenxsan",
"version": "1.2.3"
},
{
"metadata": {
"id": "06cc3e44-aedb-41b8-a4ea-29ebf3c491fd",
"publisherId": "jpoissonnier.vscode-styled-components",
"publisherDisplayName": "jpoissonnier"
},
"name": "vscode-styled-components",
"publisher": "jpoissonnier",
"version": "0.0.28"
},
{
"metadata": {
"id": "90a37ca1-92a2-488a-b196-7a8c0b0127ea",
"publisherId": "ms-vscode.vscode-typescript-tslint-plugin",
"publisherDisplayName": "ms-vscode"
},
"name": "vscode-typescript-tslint-plugin",
"publisher": "ms-vscode",
"version": "1.2.3"
},
{
"metadata": {
"id": "3262c42b-a248-4b97-9f4d-5a6812bac132",
"publisherId": "midnightsyntax.vscode-wrap-console-log",
"publisherDisplayName": "midnightsyntax"
},
"name": "vscode-wrap-console-log",
"publisher": "midnightsyntax",
"version": "1.7.2"
}
]
c9a9fc61a2940b4575086201867a7b4e9edfb1e2322cae522b0ce75b55fdd664de81c1c5b3c113d04a2e7c0482a8ccbd9a311b3e28901a888f2bdd2c671be94b1b1e8fa72c75b9b681ecee31de9646c3d6a2f916b54f02bfff76000dae57941bdbd7a0f6bde223cf0fddb4e3e28532c4a080ff5b7434b130b11b446b85adef71a4c5ea3793ec706b0fae79c23da9c0844c2248b4c79530226fe2ca7035a6d46bc0a0a617bc6a0114a002d619be5535b2f59fe1abaefdf3b6567c4c847245239289aa64724cb07261c3a1a046b35cb736a26640af26e3642d5cd754785a7eb2e8229eeef065bd1f8bc7b6567365d2364e
// Place your key bindings in this file to overwrite the defaults
[
{
"key": "ctrl+l",
"command": "console.log.wrap.down.prefix",
"when": "editorTextFocus"
},
{
"key": "ctrl+alt+w ctrl+alt+down",
"command": "-console.log.wrap.down.prefix",
"when": "editorTextFocus"
}
]
{
"workbench.colorTheme": "Monokai",
"window.zoomLevel": -1,
"editor.minimap.enabled": false,
"workbench.iconTheme": "material-icon-theme",
"git.enableSmartCommit": true,
"javascript.validate.enable": false,
"material-icon-theme.showUpdateMessage": false,
"emmet.includeLanguages": {
"javascript": "html"
},
"explorer.confirmDelete": false,
"explorer.confirmDragAndDrop": false,
"gitlens.advanced.messages": {
"suppressCommitHasNoPreviousCommitWarning": false,
"suppressCommitNotFoundWarning": false,
"suppressFileNotUnderSourceControlWarning": false,
"suppressGitVersionWarning": false,
"suppressLineUncommittedWarning": false,
"suppressNoRepositoryWarning": false,
"suppressResultsExplorerNotice": false,
"suppressShowKeyBindingsNotice": true,
"suppressUpdateNotice": true,
"suppressWelcomeNotice": true
},
"workbench.startupEditor": "",
"git.autofetch": true,
"files.eol": "\n",
"gitlens.keymap": "alternate",
"terminal.integrated.shell.windows": "C:\\Program Files\\Git\\bin\\bash.exe",
"gitlens.historyExplorer.enabled": true,
"javascript.updateImportsOnFileMove.enabled": "always",
"workbench.editor.enablePreviewFromQuickOpen": false,
"gitlens.views.fileHistory.enabled": true,
"gitlens.views.lineHistory.enabled": true,
"files.autoSave": "off",
"typescript.updateImportsOnFileMove.enabled": "always",
"workbench.activityBar.visible": true,
"breadcrumbs.enabled": true,
"window.menuBarVisibility": "default",
"liveServer.settings.donotShowInfoMsg": true,
"[javascript]": {
"editor.defaultFormatter": "vscode.typescript-language-features"
},
"sync.gist": "929b046942a9129af90a16326a4d41d8"
}
{
"JSX Comment": {
"prefix": "jc",
"body": [
"{/* $1 */}$0"
],
"description": "Inserts a React-style comment"
},
"axios.get": {
"prefix": "axios.get",
"body": [
"axios.get('/user?ID=12345')\r",
" .then(function (response) {\r",
" console.log(response);\r",
" })\r",
" .catch(function (error) {\r",
" console.log(error);\r",
" });"
],
"description": "axios get example"
},
"includes": {
"prefix": "includes",
"body": [
"this.props.domains",
" .filter(domain => domain.hostname.toLowerCase().includes(searchFilter));"
],
"description": "includes example"
},
"trycatch": {
"prefix": "trycatch",
"body": [
" try {",
" const parsed = JSON.parse(content);",
" parsedContent = isPlainObject(parsed) ? parsed : {};",
" } catch (err) {",
" parsedContent = {};",
" }"
],
"description": "trycatch"
},
"helmet-seo": {
"prefix": "helmet-seo",
"body": [
"<Helmet ",
" title= \"Page title\"",
" meta={[",
" {\"name\": \"description\", \"content\": \"Description of page\"},",
" {property: \"og:type\", content: \"article\"}",
" {property: \"og:title\", content: \"Example title\"}",
" {property: \"og:image\", content: \"http://example.com/article.jpg\"}",
" {property: \"og:url\", content: \"http://example.com/example\"}",
" ]}",
"/>"
],
"description": "helmet-seo"
},
"read more js": {
"prefix": "read more js",
"body": [
"const maxLength = 120;",
" let trimmedString = description.substr(0, maxLength);",
" trimmedString = trimmedString.substr(0, Math.min(trimmedString.length, trimmedString.lastIndexOf('')));"
],
"description": "read more js"
},
"meta-helmet": {
"prefix": "meta-helmet",
"body": [
"meta={[",
" { 'name': 'referrer', 'content': 'always' }",
"]}"
],
"description": "meta-helmet"
},
"flex-basis": {
"prefix": "flex-basis",
"body": [
"flex-basis: ${props => (props.value === 'all' ? '28.571%' : '14.285%')};"
],
"description": "flex-basis"
},
"undefined": {
"body": [
"<script crossorigin src=\"https://unpkg.com/react@16/umd/react.development.js\"></script>",
"<!-- <script>window.React || document.write('<script src=\"../../../node_modules/react/umd/react.development.js\"><\\/script>')</script> -->",
"<script crossorigin src=\"https://unpkg.com/react-dom@16/umd/react-dom.development.js\"></script>",
"<!-- <script>window.ReactDOM || document.write('<script src=\"../../../node_modules/react-dom/umd/react-dom.development.js\"><\\/script>')</script> -->",
"<script crossorigin src=\"https://unpkg.com/create-react-class@15/create-react-class.js\"></script>",
"<!-- <script>window.createReactClass || document.write('<script src=\"../../../node_modules/create-react-class/create-react-class.js\"><\\/script>')</script> -->",
""
]
},
"react-cdn-snippet": {
"prefix": "react-cdn-snippet",
"body": [
"<script crossorigin src=\"https://unpkg.com/react@16/umd/react.development.js\"></script>",
"<!-- <script>window.React || document.write('<script src=\"../../../node_modules/react/umd/react.development.js\"><\\/script>')</script> -->",
"<script crossorigin src=\"https://unpkg.com/react-dom@16/umd/react-dom.development.js\"></script>",
"<!-- <script>window.ReactDOM || document.write('<script src=\"../../../node_modules/react-dom/umd/react-dom.development.js\"><\\/script>')</script> -->",
"<script crossorigin src=\"https://unpkg.com/create-react-class@15/create-react-class.js\"></script>",
"<!-- <script>window.createReactClass || document.write('<script src=\"../../../node_modules/create-react-class/create-react-class.js\"><\\/script>')</script> -->",
"",
"<script src=\"app.js\"></script>"
],
"description": "react-cdn-snippet"
},
"es5 state component": {
"prefix": "es5 state component",
"body": [
" const PruductCustomizer = createReactClass({",
" getInitialState: function () {",
" return {",
" color: \"red\",",
" size: 8,",
" sizes: window.Inventory.allSizes,",
" colors: window.Inventory.allColors",
" }",
" },",
"",
" render: function () {",
" return (",
" <div className=\"customizer\">",
" <div className=\"product-image\" >",
" < ProductImage color={this.state.color} />",
" <div className=\"selectors\" >",
" < SizeSelector ",
" size={this.state.size} ",
" sizes={this.state.sizes} ",
" />",
" < ColorSelector ",
" color={this.state.color} ",
" colors={this.state.colors} ",
" />",
" </div>",
" </div>",
" </div>",
" );",
" }",
" })"
],
"description": "es5 state component"
},
"json-schema-custom-conditional": {
"prefix": "json-schema-custom-conditional",
"body": [
" schema={{",
" definitions: {",
" 'name': {",
" type: 'string',",
" title: 'Route Name',",
" enum: routes.map(route => route[1]),",
" enumNames: routes.map(route => route[0])",
" }",
" },",
" type: 'object',",
" required: ['name', 'layoutId'],",
" properties: {",
" 'name': { '$ref': '#/definitions/name' },",
" 'layoutId': {",
" title: 'Layout',",
" type: 'integer',",
" enum: layouts.map(x => x.id),",
" enumNames: layouts.map(x => x.name)",
" }",
" },",
" dependencies: {",
" 'name': { oneOf: createRouteDependencies() }",
" }",
" }}"
],
"description": "json-schema-custom-conditional"
},
"write-to-file-json": {
"prefix": "write-to-file-json",
"body": [
"app.post('/api/sites', (req, res) => {\r",
" fs.writeFile(\"./site.json\", JSON.stringify(req.body, null, 2), (err) => {\r",
" if (err) {\r",
" console.error(err);\r",
" return;\r",
" };\r",
" console.log(\"site.json created\");\r",
" });\r",
"})"
],
"description": "write-to-file-json"
},
"performance": {
"prefix": "performance",
"body": [
"const { performance } = require('perf_hooks');",
"",
"const before = performance.now();",
"console.log('before', before);",
"",
"",
"function ElapsedTimeLog(before) {",
" const after = performance.now();",
" console.log('after', after);",
" return before - after;",
"}",
"",
"setTimeout(() => {",
" ElapsedTimeLog(before)",
"}, 1000);",
""
],
"description": "performance"
},
"timestamp-snippet": {
"prefix": "timestamp-snippet",
"body": [
"const { performance } = require('perf_hooks');",
"",
"const before = performance.now();",
"console.log('before', before);",
"",
"",
"function ElapsedTimeLog(before) {",
" const after = performance.now();",
" console.log('after', after);",
" return before - after;",
"}",
"",
"setTimeout(() => {",
" ElapsedTimeLog(before)",
"}, 1000);",
""
],
"description": "timestamp-snippet"
},
"eslint-aibnb-setup": {
"prefix": "eslint-aibnb-setup",
"body": [
"npm i --save-dev eslint eslint-config-airbnb eslint-plugin-import eslint-plugin-jsx-a11y eslint-plugin-react"
],
"description": "eslint-aibnb-setup"
},
"toggle state dynamic example": {
"prefix": "toggle state dynamic example",
"body": [
" state = {\r",
" selectedRouteList: null,\r",
" searchFilter: '',\r",
" showModal: {\r",
" newRouteList: false,\r",
" updateRouteList: false\r",
" }\r",
" };\r",
" \r",
" handleToggleModal = (key, toggle) => {\r",
" this.setState({\r",
" showModal: {\r",
" ...this.state.showModal,\r",
" [key]: toggle\r",
" }\r",
" });\r",
" }"
],
"description": "toggle state dynamic example"
},
"eslint-disable-max": {
"prefix": "eslint-disable-max",
"body": [
"// eslint-disable-line max-len"
],
"description": "eslint-disable-max"
},
"nice trick": {
"prefix": "nice trick",
"body": [
" <>"
],
"description": "nice trick"
}
}
{
"axios.get": {
"prefix": "axios.get",
"body": [
"axios.get('/user?ID=12345')\r",
" .then(function (response) {\r",
" console.log(response);\r",
" })\r",
" .catch(function (error) {\r",
" console.log(error);\r",
" });"
],
"description": "axios get example"
},
"undefined": {
"body": [
"axios.get('/user?ID=12345')\r",
" .then(function (response) {\r",
" console.log(response);\r",
" })\r",
" .catch(function (error) {\r",
" console.log(error);\r",
" });"
]
},
"testsnip": {
"prefix": "testsnip",
"body": [
"console.log(normalizedData.result);"
],
"description": "testsnip descipr"
},
"flex-basis": {
"prefix": "flex-basis",
"body": [
"flex-basis: ${props => (props.value === 'all' ? '28.571%' : '14.285%')};"
],
"description": "flex-basis"
},
"date snippet": {
"prefix": "date snippet",
"body": [
"var date = new Date();",
"",
"let hr = date.getHours();",
"let min = date.getMinutes();",
"let sec = date.getSeconds();"
],
"description": "date snippet"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment