- HTML Introduction
- HTML Basics
- HTML Attributes
- HTML Advanced
- HTML Entities
- CSS in HTML - Cascading Style Sheets
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 HelloWorld { | |
constructor(name) { | |
this.name = name.toUpperCase(); | |
} | |
sayHi() { | |
console.log(`Hello ${this.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 { GraphQLClient } = require('graphql-request'); | |
const client = new GraphQLClient('https://api.github.com/graphql', { | |
headers: { Authorization: 'token XXXX' } | |
}); | |
(async () => { | |
try { | |
const query = ` | |
{ viewer { name repositories(isFork: true, first: 10) { edges { node { createdAt name databaseId } cursor } totalCount pageInfo { endCursor startCursor hasNextPage hasPreviousPage } } } } |
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, { Suspense, useState } from "react"; | |
import { unstable_createResource as createResource } from "react-cache"; | |
import { | |
Combobox, | |
ComboboxInput, | |
ComboboxList, | |
ComboboxOption | |
} from "./Combobox2.js"; | |
function App({ tabIndex, navigate }) { |
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 pyramid = n => { | |
const oddNumberArray = Array.from({ length: n * 2 }) | |
.map((v, i) => i + 1) | |
.filter(v => { | |
if (v % 2 !== 0) return v | |
}) | |
let oddStringArray = numberToString(oddNumberArray) | |
oddStringArray.map(v => console.log(pad(v, (n * 2) - 1))) | |
} |
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
#!/usr/bin/env node | |
console.log('hello from npx') |
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 fizzBuzz(amount) { | |
// let arr = [] | |
// for (let i = 0; i <= amount; i++) { | |
// arr.push(i) | |
// } | |
return Array.from({ length: amount + 1 }) | |
.map((v, i)=> i) | |
.filter((v => v !== 0)) | |
.map(v => { | |
if (v % 3 === 0 && v % 5 === 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
// All you need to do is add a font that has pretty good itlaics support i.e Fira, Operator, etc. and then add these two params to your existing User settings. | |
// Tested in Monokai Sharp and Super One Dark | |
{ | |
"editor.fontFamily": "'Operator Mono', Menlo, Monaco, 'Courier New', monospace", | |
"editor.tokenColorCustomizations": { | |
"textMateRules": [ | |
{ | |
"scope": [ | |
"comment", |
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
/* bling.js */ | |
window.$ = document.querySelectorAll.bind(document); | |
Node.prototype.on = window.on = function (name, fn) { | |
this.addEventListener(name, fn); | |
} | |
NodeList.prototype.__proto__ = Array.prototype; |
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 MarkdownEditor extends React.Component { | |
constructor(props) { | |
super(props); | |
this.handleChange = this.handleChange.bind(this); | |
this.state = { value: 'Type some *markdown* here!' }; | |
} | |
handleChange(e) { | |
this.setState({ value: e.target.value }); | |
} |