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
{ | |
"name": "gist-generator", | |
"displayName": "Gist Generator", | |
"description": "Create Gists of highlighted code", | |
"version": "1.0.0", | |
"publisher": "ramsaylanier", | |
"repository": "https://github.com/ramsaylanier/vs-code-gist-generator", | |
"license": "SEE IN LICENSE IN LICENSE", | |
"engines": { | |
"vscode": "^1.20.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
const vscode = require('vscode'); | |
const editor = vscode.window.activeTextEditor; | |
const rp = require('request-promise') | |
async function CreateGist () { | |
const text = editor.document.getText(editor.selection) | |
// User Input to name Gist file | |
const gistName = await vscode.window.showInputBox({ | |
placeHolder: 'Name Your GistTest' |
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
<template> | |
<div id="app"> | |
<icons/> | |
<router-view/> | |
</div> | |
</template> | |
<script> | |
import Icons from '@/components/icons/Icons.vue' | |
export default { |
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
<template> | |
<svg style="display: none"> | |
<symbol id="rule-icon" viewBox="0 0 24 24"> | |
<path d="M14,10H19.5L14,4.5V10M5,3H15L21,9V19A2,2 0 0,1 19,21H5C3.89,21 3,20.1 3,19V5C3,3.89 3.89,3 5,3M5,5V19H19V12H12V5H5Z"/> | |
</symbol> | |
<symbol id="ruleset-icon" viewBox="0 0 24 24"> | |
<path d="M3,6V22H21V24H3A2,2 0 0,1 1,22V6H3M16,9H21.5L16,3.5V9M7,2H17L23,8V18A2,2 0 0,1 21,20H7C5.89,20 5,19.1 5,18V4A2,2 0 0,1 7,2M7,4V18H21V11H14V4H7Z"/> | |
</symbol> | |
</svg> |
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
<template> | |
<transition | |
v-bind:css="false" | |
v-on:enter="enter" | |
v-on:leave="leave" | |
appear | |
> | |
<div class="modal"> | |
<div class="inner"> | |
<button class="close-button" @click="handleClose"><close-icon/></button> |
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
<template> | |
<div class="page"> | |
<div class="header"> | |
<div class="wrapper"> | |
<h1 class="title">{{game.title}}</h1> | |
</div> | |
</div> | |
<div class="body"> | |
<div class="wrapper"> | |
<router-view name="page"/> |
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
import Vue from 'vue' | |
import Router from 'vue-router' | |
import GameList from '@/components/pages/game/List.vue' | |
import GameSingle from '@/components/pages/game/Single.vue' | |
import RuleList from '@/components/pages/game/rule/List.vue' | |
import RuleSingle from '@/components/pages/game/rule/Single.vue' | |
Vue.use(Router) | |
export default new Router({ |
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
const bcrypt = require('bcryptjs') | |
const jwt = require('jsonwebtoken') | |
const { validateAndParseIdToken } = require('../../middleware/jwt') | |
async function createPrismaUser(ctx, idToken) { | |
const user = await ctx.db.mutation.createUser({ | |
data: { | |
identity: idToken.sub.split(`|`)[0], | |
auth0id: idToken.sub.split(`|`)[1], | |
name: idToken.name, |
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
const expressJwt = require('express-jwt') | |
const jwksRsa = require('jwks-rsa') | |
const jwt = require('jsonwebtoken') | |
const jwksOptions = { | |
cache: true, | |
rateLimit: true, | |
jwksRequestsPerMinute: 1, | |
jwksUri: `https://${process.env.AUTH0_DOMAIN}/.well-known/jwks.json` | |
} |