+import { Fragment, useEffect, useState } from "react";
+import { supported } from "@github/webauthn-json";
export default function Register() {
const [username, setUsername] = useState("");
const [email, setEmail] = useState("");
+ const [isAvailable, setIsAvailable] = useState<boolean | null>(null);
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
```tsx title="pages/register.tsx" | |
import { Fragment, useEffect, useState } from "react"; // [!code ++] | |
import { supported } from "@github/webauthn-json"; // [!code ++] | |
export default function Register() { | |
const [username, setUsername] = useState(""); | |
const [email, setEmail] = useState(""); | |
const [isAvailable, setIsAvailable] = useState<boolean | null>(null); // [!code ++] | |
useEffect(() => { // [!code ++] |
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
> wow | |
> i feel left out now |
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
(function (factory) { | |
typeof define === 'function' && define.amd ? define(factory) : | |
factory(); | |
}((function () { 'use strict'; | |
const Rails = { | |
// Link elements bound by rails-ujs | |
linkClickSelector: | |
'a[data-confirm], a[data-method], a[data-remote]:not([disabled]), a[data-disable-with], a[data-disable]', |
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
[Enter steps to reproduce:] | |
1. ... | |
2. ... | |
**Atom**: 1.21.0 x64 | |
**Electron**: 1.6.9 | |
**OS**: Mac OS X 10.12.6 | |
**Thrown From**: Atom Core |
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
class A | |
def b(params) | |
payload = config.merge(params) | |
uri = get_endpoint | |
Net::HTTP.post(uri, payload) | |
end | |
end | |
# Wanted to test A::b by stubbing out Net::HTTP and examining what it was being called with. | |
# Maybe not the best way of approaching the test, but seemed logical to me. Ended up with the |
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 Document, { Head, Main, NextScript } from 'next/document' | |
export default class CustomDocument extends Document { | |
static async getInitialProps (ctx) { | |
return await Document.getInitialProps(ctx) | |
} | |
render () { | |
return ( | |
<html> | |
<Head> |
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
export default class extends React.Component { | |
constructor(props) { | |
super(props) | |
this.state = { menuActive: false } | |
this.toggleNavigation = this.toggleNavigation.bind(this) | |
this.closeNavigation = this.closeNavigation.bind(this) | |
} | |
componentDidMount() { | |
document.body.addEventListener('click', this.closeNavigation) |
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
<!-- Begin Jekyll SEO tag v2.1.0 --> | |
<title>Welcome to Jekyll! - Your awesome title</title> | |
<meta property="og:title" content="Welcome to Jekyll!" /> | |
<meta name="description" content="You’ll find this post in your _posts directory. Go ahead and edit it and re-build the site to see your changes. You can rebuild the site in many different ways, but the most common way is to run jekyll serve, which launches a web server and auto-regenerates your site when a file is updated.1 This shouldn’t be included in the SEO description, but it will be. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris tristique odio eu lectus scelerisque, sed accumsan elit tincidunt. Vestibulum scelerisque est ut ante aliquet vestibulum. Phasellus egestas quam velit. Aliquam sit amet placerat lacus. Sed vitae tortor condimentum, dignissim ipsum nec, hendrerit enim. Pellentesque ornare risus metus, sit amet ultricies lorem commodo et. In non ipsum consequat, imperdiet nisl rutrum, blandit ex. Integer commodo nulla nec odio ul |
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
module Jekyll | |
module ConcatFilter | |
# Public: Combines two arrays | |
# | |
# first_array - The initial Array to use | |
# second_array - The Array to add | |
# | |
# Examples | |
# | |
# {{ site.data.disney_movies | concat: site.data.pixar_movies }} |
NewerOlder