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
// ---------------------------------------------------------- | |
// A short snippet for detecting versions of IE in JavaScript | |
// without resorting to user-agent sniffing | |
// ---------------------------------------------------------- | |
// If you're not in IE (or IE version is less than 5) then: | |
// ie === undefined | |
// If you're in IE (>=5) then you can determine which version: | |
// ie === 7; // IE7 | |
// Thus, to detect IE: | |
// if (ie) {} |
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
{ | |
"extends": [ | |
"airbnb", | |
"prettier", | |
"prettier/react" | |
], | |
"plugins": [ | |
"prettier" | |
], | |
"rules": { |
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
" ---------------------------------------------------------------------------- | |
" ale | |
" ---------------------------------------------------------------------------- | |
nmap <leader>p <Plug>(ale_fix) | |
"let g:ale_lint_on_save = 1 | |
"let g:ale_fix_on_save = 1 | |
let g:ale_completion_enabled = 1 | |
let g:ale_linters = { | |
\ 'javascript' : ['eslint', 'flow'], | |
\ 'html' : ['htmlhint', 'tidy'], |
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 React from 'react'; | |
import Popular from './Popular'; | |
import { BroswerRouter, Route } from 'react-router-dom'; | |
import Nav from './Nav'; | |
import Home from './Home'; | |
import Battle from './Battle'; | |
class App extends React.Component { | |
render() { | |
return ( |
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
<script src="https://fb.me/react-15.1.0.js"></script> | |
<script src="https://fb.me/react-dom-15.1.0.js"></script> | |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>JS Bin</title> | |
</head> | |
<body> |
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
### Keybase proof | |
I hereby claim: | |
* I am jonleopard on github. | |
* I am jonleopard (https://keybase.io/jonleopard) on keybase. | |
* I have a public key whose fingerprint is B736 4543 FBB5 DE1A 2496 E926 A475 0F00 D5A2 5EDC | |
To claim this, I am signing this object: |
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
// @ts-check | |
// Requires module: slug, gatsby-source-filesystem | |
const path = require('path') | |
const slugify = require('slug') | |
const { createFilePath } = require('gatsby-source-filesystem') | |
// Regex to parse date and title from the filename | |
const BLOG_POST_SLUG_REGEX = /^\/blog\/([\d]{4})-([\d]{2})-([\d]{2})-(.+)\/$/ |
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
// Normalize.css | |
import { injectGlobal } from 'styled-components' | |
import styledNormalize from 'styled-normalize' | |
injectGlobal` | |
${styledNormalize} | |
` |
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
// // | |
// Notes on React.js // | |
// // | |
// ES6 Arrow Function | |
// This is a functional component | |
const App = () => { | |
return <h1>Hello World</h1> | |
}; |
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
{ | |
"ecmaVersion": 6, | |
"libs": [ | |
"browser" | |
], | |
"loadEagerly": [ | |
"path/to/your/js/**/*.js" | |
], |
OlderNewer