This file contains hidden or 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
| call plug#begin() | |
| Plug 'drewtempelmeyer/palenight.vim' | |
| Plug 'vim-airline/vim-airline' | |
| Plug 'wlangstroth/vim-racket' | |
| Plug 'sheerun/vim-polyglot' | |
| Plug 'rust-lang/rust.vim' | |
| Plug 'preservim/tagbar' | |
| Plug 'universal-ctags/ctags' | |
| Plug 'luochen1990/rainbow' | |
| Plug 'itchyny/lightline.vim' |
This file contains hidden or 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 React from 'react'; | |
| import { useRecoilState } from 'recoil'; | |
| import { someTextState } from './state.js'; | |
| function SomeComponent() { | |
| const [someText, setSomeText] = useRecoilState(someTextState); | |
| const onChange = (event) => { | |
| setSomeText(event.target.value); | |
| }; |
This file contains hidden or 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 { atom } from 'recoil'; | |
| export const someTextState = atom({ | |
| key: 'someTextState', | |
| default: '' | |
| }); |
This file contains hidden or 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 React from 'react'; | |
| import { RecoilRoot } from 'recoil'; | |
| import SomeComponent from './somecomponent.js'; | |
| function App() { | |
| return ( | |
| <RecoilRoot> | |
| <SomeComponent /> | |
| </RecoilRoot> | |
| ); |
This file contains hidden or 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
| <script src='https://cdnjs.cloudflare.com/ajax/libs/turbolinks/5.2.0/turbolinks.js'> | |
| Turbolinks.start(); | |
| </script> |
This file contains hidden or 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 CLIENT_ID = process.env.CLIENT_ID; | |
| const CLIENT_SECRET = process.env.CLIENT_SECRET; | |
| const REDIRECT = process.env.DISCORD_CALLBACK_URI; | |
| app.get('/discord/callback', async function(req, res) { | |
| // We must check to ensure that a code was provided for us to use | |
| if (!req.query.code) res.send('No code provided!'); | |
| const code = req.query.code; | |
| // We will now create the credentials we will use to get our access and refresh tokens |
This file contains hidden or 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 DISCORD_SIGNIN_LINK = process.env.DISCORD_SIGNIN_LINK; | |
| app.get('/login', function(req, res) { | |
| res.redirect(DISCORD_SIGNIN_LINK); | |
| }); |
This file contains hidden or 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
| DISCORD_CLIENT_ID=<Your Discord Client ID> | |
| DISCORD_CLIENT_SECRET=<Your Discord Client Secret> | |
| DISCORD_SIGNIN_LINK=<Your Discord signin link> | |
| DISCORD_CALLBACK_URI=<Your Discord Callback URL> |
This file contains hidden or 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
| require('dotenv').config(); | |
| const express = require('express'); | |
| const btoa = require('btoa'); | |
| const fetch = require('node-fetch'); | |
| app.get('/', function(req, res) { | |
| res.send('Head to `/login` to login'); | |
| }); | |
| app.listen(3000, function() { |
This file contains hidden or 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
| set number | |
| set updatetime=100 | |
| call plug#begin('~/.config/nvim/autoloada') | |
| Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugin' } | |
| Plug 'cloudhead/neovim-fuzzy' | |
| Plug 'scrooloose/nerdtree' | |
| Plug 'Xuyuanp/nerdtree-git-plugin' | |
| call plug#end() |