Last active
October 25, 2019 23:47
-
-
Save sebastianmacias/a1bb490a2eca628b99aa0672b7c3007f to your computer and use it in GitHub Desktop.
Visual Studio Code Settings Sync Gist
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"lastUpload":"2019-10-25T23:47:51.781Z","extensionVersion":"v3.4.3"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"metadata": { | |
"id": "6e440e71-8ed9-4f25-bb78-4b13096b8a03", | |
"publisherId": "formulahendry.auto-rename-tag", | |
"publisherDisplayName": "formulahendry" | |
}, | |
"name": "auto-rename-tag", | |
"publisher": "formulahendry", | |
"version": "0.1.0" | |
}, | |
{ | |
"metadata": { | |
"id": "7a0110bb-231a-4598-aa1b-0769ea46d28b", | |
"publisherId": "aaron-bond.better-comments", | |
"publisherDisplayName": "aaron-bond" | |
}, | |
"name": "better-comments", | |
"publisher": "aaron-bond", | |
"version": "2.0.5" | |
}, | |
{ | |
"metadata": { | |
"id": "464f4ac7-af65-4aa9-9907-4ba7fa419085", | |
"publisherId": "bungcip.better-toml", | |
"publisherDisplayName": "bungcip" | |
}, | |
"name": "better-toml", | |
"publisher": "bungcip", | |
"version": "0.3.2" | |
}, | |
{ | |
"metadata": { | |
"id": "b689fcc8-d494-4dbf-a228-2c694a578afc", | |
"publisherId": "alefragnani.Bookmarks", | |
"publisherDisplayName": "alefragnani" | |
}, | |
"name": "Bookmarks", | |
"publisher": "alefragnani", | |
"version": "10.5.0" | |
}, | |
{ | |
"metadata": { | |
"id": "f583eafd-aa0d-4ccb-8f44-d1e610389660", | |
"publisherId": "CoenraadS.bracket-pair-colorizer", | |
"publisherDisplayName": "CoenraadS" | |
}, | |
"name": "bracket-pair-colorizer", | |
"publisher": "CoenraadS", | |
"version": "1.0.61" | |
}, | |
{ | |
"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": "f6dbd813-b0a0-42c1-90ea-10dde9d925a7", | |
"publisherId": "streetsidesoftware.code-spell-checker", | |
"publisherDisplayName": "streetsidesoftware" | |
}, | |
"name": "code-spell-checker", | |
"publisher": "streetsidesoftware", | |
"version": "1.7.18" | |
}, | |
{ | |
"metadata": { | |
"id": "532533c9-a894-4a58-9eee-bbfbe7c06f71", | |
"publisherId": "mikestead.dotenv", | |
"publisherDisplayName": "mikestead" | |
}, | |
"name": "dotenv", | |
"publisher": "mikestead", | |
"version": "1.0.1" | |
}, | |
{ | |
"metadata": { | |
"id": "9987d9ed-a5ee-4202-8eec-388d8ed45538", | |
"publisherId": "LeonardoRuhland.duplicate-module", | |
"publisherDisplayName": "LeonardoRuhland" | |
}, | |
"name": "duplicate-module", | |
"publisher": "LeonardoRuhland", | |
"version": "0.0.3" | |
}, | |
{ | |
"metadata": { | |
"id": "9d8c32ab-354c-4daf-a9bf-20b633734435", | |
"publisherId": "usernamehw.errorlens", | |
"publisherDisplayName": "usernamehw" | |
}, | |
"name": "errorlens", | |
"publisher": "usernamehw", | |
"version": "2.7.2" | |
}, | |
{ | |
"metadata": { | |
"id": "e55376f2-3b3e-4916-8dbf-34df2fce687b", | |
"publisherId": "drKnoxy.eslint-disable-snippets", | |
"publisherDisplayName": "drKnoxy" | |
}, | |
"name": "eslint-disable-snippets", | |
"publisher": "drKnoxy", | |
"version": "1.2.0" | |
}, | |
{ | |
"metadata": { | |
"id": "feda5228-1904-4f14-9634-1f4e51c529df", | |
"publisherId": "kdcro101.favorites", | |
"publisherDisplayName": "kdcro101" | |
}, | |
"name": "favorites", | |
"publisher": "kdcro101", | |
"version": "2.4.5" | |
}, | |
{ | |
"metadata": { | |
"id": "6d2b4ef2-1d6d-4a1f-91fb-29fcadfb4b0a", | |
"publisherId": "vector-of-bool.gitflow", | |
"publisherDisplayName": "vector-of-bool" | |
}, | |
"name": "gitflow", | |
"publisher": "vector-of-bool", | |
"version": "1.2.1" | |
}, | |
{ | |
"metadata": { | |
"id": "3e891cf9-53cb-49a3-8d01-8f0b1f0afb29", | |
"publisherId": "codezombiech.gitignore", | |
"publisherDisplayName": "codezombiech" | |
}, | |
"name": "gitignore", | |
"publisher": "codezombiech", | |
"version": "0.6.0" | |
}, | |
{ | |
"metadata": { | |
"id": "0fa141d2-0184-49b6-b8f6-b572f965b164", | |
"publisherId": "michelemelluso.gitignore", | |
"publisherDisplayName": "michelemelluso" | |
}, | |
"name": "gitignore", | |
"publisher": "michelemelluso", | |
"version": "1.0.1" | |
}, | |
{ | |
"metadata": { | |
"id": "4de763bd-505d-4978-9575-2b7696ecf94e", | |
"publisherId": "eamodio.gitlens", | |
"publisherDisplayName": "eamodio" | |
}, | |
"name": "gitlens", | |
"publisher": "eamodio", | |
"version": "10.1.1" | |
}, | |
{ | |
"metadata": { | |
"id": "c6f98943-7f9b-4776-b2a8-409227a481e2", | |
"publisherId": "arturock.gitstash", | |
"publisherDisplayName": "arturock" | |
}, | |
"name": "gitstash", | |
"publisher": "arturock", | |
"version": "3.1.0" | |
}, | |
{ | |
"metadata": { | |
"id": "d6f6cfea-4b6f-41f4-b571-6ad2ab7918da", | |
"publisherId": "ms-vscode.Go", | |
"publisherDisplayName": "ms-vscode" | |
}, | |
"name": "Go", | |
"publisher": "ms-vscode", | |
"version": "0.11.7" | |
}, | |
{ | |
"metadata": { | |
"id": "3e8a391a-f3f0-44b2-8631-7847b0c8839a", | |
"publisherId": "kumar-harsh.graphql-for-vscode", | |
"publisherDisplayName": "kumar-harsh" | |
}, | |
"name": "graphql-for-vscode", | |
"publisher": "kumar-harsh", | |
"version": "1.15.1" | |
}, | |
{ | |
"metadata": { | |
"id": "a2cec723-5349-460d-9de9-0fd1f8d3456f", | |
"publisherId": "xabikos.JavaScriptSnippets", | |
"publisherDisplayName": "xabikos" | |
}, | |
"name": "JavaScriptSnippets", | |
"publisher": "xabikos", | |
"version": "1.7.2" | |
}, | |
{ | |
"metadata": { | |
"id": "5db78037-f674-459f-a236-db622c427c5b", | |
"publisherId": "PKief.material-icon-theme", | |
"publisherDisplayName": "PKief" | |
}, | |
"name": "material-icon-theme", | |
"publisher": "PKief", | |
"version": "3.9.1" | |
}, | |
{ | |
"metadata": { | |
"id": "e58f546c-babc-455f-a265-ba40dbd140d4", | |
"publisherId": "sdras.night-owl", | |
"publisherDisplayName": "sdras" | |
}, | |
"name": "night-owl", | |
"publisher": "sdras", | |
"version": "1.1.3" | |
}, | |
{ | |
"metadata": { | |
"id": "dff6b801-247e-40e9-82e8-8c9b1d19d1b8", | |
"publisherId": "christian-kohler.npm-intellisense", | |
"publisherDisplayName": "christian-kohler" | |
}, | |
"name": "npm-intellisense", | |
"publisher": "christian-kohler", | |
"version": "1.3.0" | |
}, | |
{ | |
"metadata": { | |
"id": "2a3e1925-d174-4cd7-baa7-3e13824d68c7", | |
"publisherId": "ronnidc.nunjucks", | |
"publisherDisplayName": "ronnidc" | |
}, | |
"name": "nunjucks", | |
"publisher": "ronnidc", | |
"version": "0.2.3" | |
}, | |
{ | |
"metadata": { | |
"id": "96fa4707-6983-4489-b7c5-d5ffdfdcce90", | |
"publisherId": "esbenp.prettier-vscode", | |
"publisherDisplayName": "esbenp" | |
}, | |
"name": "prettier-vscode", | |
"publisher": "esbenp", | |
"version": "2.3.0" | |
}, | |
{ | |
"metadata": { | |
"id": "93ce222b-5f6f-49b7-9ab1-a0463c6238df", | |
"publisherId": "ms-vscode-remote.remote-containers", | |
"publisherDisplayName": "ms-vscode-remote" | |
}, | |
"name": "remote-containers", | |
"publisher": "ms-vscode-remote", | |
"version": "0.81.1" | |
}, | |
{ | |
"metadata": { | |
"id": "607fd052-be03-4363-b657-2bd62b83d28a", | |
"publisherId": "ms-vscode-remote.remote-ssh", | |
"publisherDisplayName": "ms-vscode-remote" | |
}, | |
"name": "remote-ssh", | |
"publisher": "ms-vscode-remote", | |
"version": "0.47.2" | |
}, | |
{ | |
"metadata": { | |
"id": "bfeaf631-bcff-4908-93ed-fda4ef9a0c5c", | |
"publisherId": "ms-vscode-remote.remote-ssh-edit", | |
"publisherDisplayName": "ms-vscode-remote" | |
}, | |
"name": "remote-ssh-edit", | |
"publisher": "ms-vscode-remote", | |
"version": "0.47.2" | |
}, | |
{ | |
"metadata": { | |
"id": "5d9b66c1-7da3-4004-8c92-2b0852ec0c9b", | |
"publisherId": "ms-vscode-remote.remote-ssh-explorer", | |
"publisherDisplayName": "ms-vscode-remote" | |
}, | |
"name": "remote-ssh-explorer", | |
"publisher": "ms-vscode-remote", | |
"version": "0.47.2" | |
}, | |
{ | |
"metadata": { | |
"id": "f0c5397b-d357-4197-99f0-cb4202f22818", | |
"publisherId": "ms-vscode-remote.remote-wsl", | |
"publisherDisplayName": "ms-vscode-remote" | |
}, | |
"name": "remote-wsl", | |
"publisher": "ms-vscode-remote", | |
"version": "0.39.9" | |
}, | |
{ | |
"metadata": { | |
"id": "431aa1a8-74f4-43d5-a83b-f4960510da5f", | |
"publisherId": "ahmadawais.shades-of-purple", | |
"publisherDisplayName": "ahmadawais" | |
}, | |
"name": "shades-of-purple", | |
"publisher": "ahmadawais", | |
"version": "5.21.0" | |
}, | |
{ | |
"metadata": { | |
"id": "f6cdab4a-b0c5-4633-a54c-e0d7567291bc", | |
"publisherId": "srcery-colors.srcery-colors", | |
"publisherDisplayName": "srcery-colors" | |
}, | |
"name": "srcery-colors", | |
"publisher": "srcery-colors", | |
"version": "0.3.4" | |
}, | |
{ | |
"metadata": { | |
"id": "4e44877c-1c8d-4f9c-ba86-1372d0fbeeb1", | |
"publisherId": "dracula-theme.theme-dracula", | |
"publisherDisplayName": "dracula-theme" | |
}, | |
"name": "theme-dracula", | |
"publisher": "dracula-theme", | |
"version": "2.18.1" | |
}, | |
{ | |
"metadata": { | |
"id": "2f5dd8cb-d251-4d70-abfe-ddebcb077483", | |
"publisherId": "octref.vetur", | |
"publisherDisplayName": "octref" | |
}, | |
"name": "vetur", | |
"publisher": "octref", | |
"version": "0.22.6" | |
}, | |
{ | |
"metadata": { | |
"id": "0479fc1c-3d67-49f9-b087-fb9069afe48f", | |
"publisherId": "ms-azuretools.vscode-docker", | |
"publisherDisplayName": "ms-azuretools" | |
}, | |
"name": "vscode-docker", | |
"publisher": "ms-azuretools", | |
"version": "0.8.1" | |
}, | |
{ | |
"metadata": { | |
"id": "03944bdc-9bcb-4ac2-b9b3-fdb050dd43e4", | |
"publisherId": "mrmlnc.vscode-duplicate", | |
"publisherDisplayName": "mrmlnc" | |
}, | |
"name": "vscode-duplicate", | |
"publisher": "mrmlnc", | |
"version": "1.2.1" | |
}, | |
{ | |
"metadata": { | |
"id": "9ccc1dd7-7ec4-4a46-bd4f-7d7b8b9d322a", | |
"publisherId": "vscode-icons-team.vscode-icons", | |
"publisherDisplayName": "vscode-icons-team" | |
}, | |
"name": "vscode-icons", | |
"publisher": "vscode-icons-team", | |
"version": "9.5.0" | |
}, | |
{ | |
"metadata": { | |
"id": "3c6d2422-afcc-482d-a751-08c6ed38ce19", | |
"publisherId": "wmaurer.vscode-jumpy", | |
"publisherDisplayName": "wmaurer" | |
}, | |
"name": "vscode-jumpy", | |
"publisher": "wmaurer", | |
"version": "0.3.1" | |
}, | |
{ | |
"metadata": { | |
"id": "c856990a-978d-46eb-aa5e-318cd7bfecc6", | |
"publisherId": "shanoor.vscode-nginx", | |
"publisherDisplayName": "shanoor" | |
}, | |
"name": "vscode-nginx", | |
"publisher": "shanoor", | |
"version": "0.6.0" | |
}, | |
{ | |
"metadata": { | |
"id": "23d72dfc-8dd1-4e30-926e-8783b4378f13", | |
"publisherId": "ms-vscode-remote.vscode-remote-extensionpack", | |
"publisherDisplayName": "ms-vscode-remote" | |
}, | |
"name": "vscode-remote-extensionpack", | |
"publisher": "ms-vscode-remote", | |
"version": "0.17.0" | |
}, | |
{ | |
"metadata": { | |
"id": "28fcf0b8-26a5-4e99-9b8d-02e990366c6f", | |
"publisherId": "tombonnike.vscode-status-bar-format-toggle", | |
"publisherDisplayName": "tombonnike" | |
}, | |
"name": "vscode-status-bar-format-toggle", | |
"publisher": "tombonnike", | |
"version": "2.0.0" | |
}, | |
{ | |
"metadata": { | |
"id": "8551ab30-570a-4f12-b988-bccdb9ce8610", | |
"publisherId": "sdras.vue-vscode-extensionpack", | |
"publisherDisplayName": "sdras" | |
}, | |
"name": "vue-vscode-extensionpack", | |
"publisher": "sdras", | |
"version": "0.2.0" | |
}, | |
{ | |
"metadata": { | |
"id": "c8d95916-cf54-455f-b324-cbd887b7d3a8", | |
"publisherId": "sdras.vue-vscode-snippets", | |
"publisherDisplayName": "sdras" | |
}, | |
"name": "vue-vscode-snippets", | |
"publisher": "sdras", | |
"version": "1.8.0" | |
} | |
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Place your key bindings in this file to override the defaultsauto[] | |
[ | |
{ | |
"key": "ctrl+alt+down", | |
"command": "editor.action.copyLinesDownAction", | |
"when": "editorTextFocus && !editorReadonly" | |
}, | |
{ | |
"key": "ctrl+shift+alt+down", | |
"command": "-editor.action.copyLinesDownAction", | |
"when": "editorTextFocus && !editorReadonly" | |
}, | |
{ | |
"key": "ctrl+alt+up", | |
"command": "editor.action.copyLinesUpAction", | |
"when": "editorTextFocus && !editorReadonly" | |
}, | |
{ | |
"key": "ctrl+shift+alt+up", | |
"command": "-editor.action.copyLinesUpAction", | |
"when": "editorTextFocus && !editorReadonly" | |
} | |
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Empty |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"workbench.colorTheme": "Dracula", | |
"workbench.iconTheme": "vscode-icons", | |
"editor.tabCompletion": "on", | |
"editor.formatOnSave": true, | |
"editor.fontFamily": "Fira Code", | |
"editor.fontSize": 18, | |
"editor.fontLigatures": true, | |
"window.menuBarVisibility": "toggle", | |
"window.titleBarStyle": "custom", | |
"window.zoomLevel": 0, | |
"git.enableSmartCommit": true, | |
"git.confirmSync": false, | |
"git.autofetch": true, | |
"go.useLanguageServer": true, | |
"vetur.format.defaultFormatter.ts": "vscode-typescript", | |
"sync.gist": "a1bb490a2eca628b99aa0672b7c3007f", | |
"vsicons.dontShowNewVersionMessage": true, | |
"cSpell.userWords": [ | |
"com", | |
"fatih", | |
"github", | |
"godotenv", | |
"graphql", | |
"postgres", | |
"twilio", | |
"uuid" | |
] | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
/* | |
// Place your snippets for Go here. Each snippet is defined under a snippet name and has a prefix, body and | |
// description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are: | |
// $1, $2 for tab stops, ${id} and ${id:label} and ${1:label} for variables. Variables with the same id are connected. | |
// Example: | |
"Print to console": { | |
"prefix": "log", | |
"body": [ | |
"console.log('$1');", | |
"$2" | |
], | |
"description": "Log output to console" | |
} | |
*/ | |
//Errors | |
"Error Idiom": { | |
"prefix": "erri", | |
"body": [ | |
"if _, err := $1; err != nil {", " return err", | |
"}", | |
"", | |
"$2" | |
], | |
"description": "Handle error while calling a function" | |
}, | |
"Error Simple": { | |
"prefix": "errsp", | |
"body": [ | |
"err = $1", | |
"if err != nil{", " return err", | |
"}", | |
"", | |
"$2" | |
], | |
"description": "Simple error handling" | |
}, | |
"Error Simple Only": { | |
"prefix": "errs", | |
"body": [ | |
"if err != nil{", " return err", | |
"}", | |
"", | |
"$2" | |
], | |
"description": "Simple error handling" | |
}, | |
"Multierror Declare": { | |
"prefix": "mud", | |
"body": [ | |
"var returnErrors *multierror.Error", | |
"", | |
"$1" | |
], | |
"description": "Declares a multierror variable" | |
}, | |
"Multierror Idiom": { | |
"prefix": "mui", | |
"body": [ | |
"if err := $1; err != nil {", | |
" returnErrors = multierror.Append(returnErrors, err)", | |
"}", | |
"", | |
"$2" | |
], | |
"description": "Handles errors while calling a function" | |
}, | |
"Multierror Idiom Return": { | |
"prefix": "muir", | |
"body": [ | |
"if err := $1; err != nil {", | |
" returnErrors = multierror.Append(returnErrors, err)", | |
" return returnErrors.ErrorOrNil()", | |
"}", | |
"$2" | |
], | |
"description": "Handles errors while calling a function" | |
}, | |
"Multierror append": { | |
"prefix": "mua", | |
"body": [ | |
"returnErrors = multierror.Append(returnErrors, err)", | |
"$1" | |
], | |
"description": "Appends existing error" | |
}, | |
"Multierror append new error": { | |
"prefix": "muan", | |
"body": [ | |
"returnErrors = multierror.Append(returnErrors, errors.New(\"$1\"))", | |
"$2" | |
], | |
"description": "Appends new error" | |
}, | |
"Multierror Return": { | |
"prefix": "mur", | |
"body": [ | |
"return returnErrors.ErrorOrNil()" | |
], | |
"description": "Returns a multierror or nil" | |
}, | |
//Strings | |
"Multiline string": { | |
"prefix": "mls", | |
"body": [ | |
"var $1 = `", " $2", | |
"`", | |
"" | |
], | |
"description": "Returns a multierror or nil" | |
}, | |
//logrus | |
"Logrus add package": { | |
"prefix": "logp", | |
"body": [ | |
"log \"github.com/sirupsen/logrus\"", | |
"$1" | |
], | |
"description": "Adds logrus package" | |
}, | |
"Logrus setup logger": { | |
"prefix": "logs", | |
"body": [ | |
"func setupLogger() {", | |
" // Output to stderr instead of stdout, could also be a file.", | |
" log.SetOutput(os.Stderr)", | |
" ", | |
" log.SetLevel(log.DebugLevel)", | |
" log.SetFormatter(&log.TextFormatter{ForceColors: true})", | |
"}", | |
"$1" | |
], | |
"description": "Sets up logrus logger" | |
}, | |
"Logrus debug": { | |
"prefix": "logd", | |
"body": [ | |
"log.Debug(\"$1\")", | |
"$2" | |
], | |
"description": "log.Debug" | |
}, | |
"Logrus error": { | |
"prefix": "loge", | |
"body": [ | |
"log.Error(\"$1\")", | |
"$2" | |
], | |
"description": "log.Error" | |
}, | |
"Logrus info": { | |
"prefix": "logi", | |
"body": [ | |
"log.Info(\"$1\")", | |
"$2" | |
], | |
"description": "log.Info" | |
}, | |
"Logrus log with fields": { | |
"prefix": "logwf", | |
"body": [ | |
"log.WithFields(log.Fields{", " \"$1\": $2,", | |
"}).Info(\"$3\")" | |
], | |
"description": "Log with fields" | |
}, | |
"Logrus log with fields error": { | |
"prefix": "logwfe", | |
"body": [ | |
"log.WithFields(log.Fields{", " \"$1\": $2,", | |
"}).Error(\"$3\")" | |
], | |
"description": "Log error with fields" | |
}, | |
"Logrus log with fields debug": { | |
"prefix": "logwfd", | |
"body": [ | |
"log.WithFields(log.Fields{", " \"$1\": $2,", | |
"}).Debug(\"$3\")" | |
], | |
"description": "Log error with fields" | |
}, | |
"NewAction": { | |
"prefix": "newaction", | |
"body": [ | |
"// **************************", | |
"// * NEW ACTION STARTS HERE *", | |
"// **************************", | |
"", | |
"// myMethodNameInput is the input of MyMethodName action", | |
"type myMethodNameInput struct {", | |
" MyVar string `json:\"myVar\"`", | |
"}", | |
"", | |
"// myMethodNameQueryOutput is the output of the MyMethodName action query", | |
"type myMethodNameQueryOutput struct {", | |
" Data struct {", | |
" } `json:\"data\"`", | |
"}", | |
"", | |
"// MyMethodName is used to", | |
"func MyMethodName(input myMethodNameInput) error {", | |
" query := `", | |
"", | |
"`", | |
" s := compileQuery(query, map[string]interface{}{", | |
" \"key\": \"val\",", | |
" })", | |
"", | |
" var queryOutput myMethodNameQueryOutput", | |
" err := Graphql.Post(graph.Input{", | |
" Role: \"api\",", | |
" Query: graph.NewQuery(s),", | |
" }, &queryOutput)", | |
"", | |
" if err != nil {", | |
" return err", | |
" }", | |
"", | |
" return nil", | |
"}", | |
"", | |
"// **************************", | |
"// * NEW ACTION ENDS HERE *", | |
"// **************************" | |
], | |
"description": "NewAction" | |
}, | |
"Color 1": { | |
"prefix": "c1", | |
"body": [ | |
"ansi.Color(\"$1\", \"white+b:red\")" | |
], | |
"description": "Color 1" | |
}, | |
"Color 2": { | |
"prefix": "c2", | |
"body": [ | |
"ansi.Color(\" > $1\", \"white+b:yellow\")" | |
], | |
"description": "Color 2" | |
}, | |
"Color 3": { | |
"prefix": "c3", | |
"body": [ | |
"ansi.Color(\" > > $1\", \"white+b:cyan\")" | |
], | |
"description": "Color 2" | |
}, | |
"Start Timer": { | |
"prefix": "timest", | |
"body": [ | |
"start := time.Now()" | |
], | |
"description": "Start Timer" | |
}, | |
"Log Time": { | |
"prefix": "timelg", | |
"body": [ | |
" log.WithFields(log.Fields{", | |
" \"elapsed\": time.Since(start),", | |
" }).Info(\"Total time\")" | |
], | |
"description": "Log Time" | |
}, | |
// Type casting | |
"converInt64ToString": { | |
"prefix": "converInt64ToString", | |
"body": [ | |
"strconv.FormatInt($1, 10)" | |
], | |
"description": "Converts int64 to decimal string" | |
}, | |
"converStringToInt64": { | |
"prefix": "converStringToInt64", | |
"body": [ | |
"$2, err := strconv.ParseInt($1, 10, 64)" | |
], | |
"description": "Converts string to int64" | |
}, | |
"converFloat64ToString": { | |
"prefix": "converFloat64ToString", | |
"body": [ | |
"strconv.FormatFloat($1, 'f', 6, 64)" | |
], | |
"description": "Converts int64 to decimal string" | |
}, | |
// Collections | |
"iterateMapKeyValue": { | |
"prefix": "iterateMapKeyValue", | |
"body": [ | |
"for k, v := range $1 { ", | |
" ", | |
"}" | |
], | |
"description": "Iterates over a map returning the key and the value" | |
}, | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment