Skip to content

Instantly share code, notes, and snippets.

@matthieubosquet
Created December 3, 2016 18:32
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 matthieubosquet/37f6ce90695e5a6ed62f43a3ee911728 to your computer and use it in GitHub Desktop.
Save matthieubosquet/37f6ce90695e5a6ed62f43a3ee911728 to your computer and use it in GitHub Desktop.
VSCode snippets
{
"html document": {
"prefix": "html",
"body": [
"<!doctype html>",
"<html>",
"<head>",
" <meta charset=\"utf-8\">",
" <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge,chrome=1\">",
" <meta name=\"author\" content=\"Matthieu Bosquet\" />",
" <meta name=\"viewport\" content=\"width=device-width\">",
" <meta name=\"theme-color\" content=\"#3E4038\">",
"",
" <style type=\"text/css\">",
" /** Here goes google font imports **/",
" </style>",
"",
" <link rel=\"icon\" sizes=\"192x192\" href=\"/favicon.png\">",
" <link rel=\"stylesheet\" media=\"screen\" href=\"/css/neiges.css\">",
"",
" <meta name=\"description\" content=\"\">",
" <title></title>",
"</head>",
"<body>",
" <script src=\"/js/main.js\"></script>",
" <script type=\"text/javascript\">",
" /* Here goes analytics code */ ",
" </script>",
"</body>",
"</html>"
],
"description": "Basic html document."
}
}
{
"Service worker": {
"prefix": "service",
"body": [
"if ('serviceWorker' in navigator) {",
" navigator.serviceWorker.register('/sw.js', {scope: '/'});",
"}"
],
"description": "Register a service worker 'sw.js' if the browser supports it. This service worker will control everything from the root of the domain (default scope is './')."
}
}
{
"vscode": "snippets"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment